From: Filipe Manana Date: Thu, 31 Dec 2015 18:16:29 +0000 (+0000) Subject: Btrfs: fix number of transaction units required to create symlink X-Git-Tag: v4.1.12-92~150^2~112 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=47c14c50025045ade136bc53668a7fa895d2fbf9;p=users%2Fjedix%2Flinux-maple.git Btrfs: fix number of transaction units required to create symlink Orabug: 23331027 [ Upstream commit 9269d12b2d57d9e3d13036bb750762d1110d425c ] We weren't accounting for the insertion of an inline extent item for the symlink inode nor that we need to update the parent inode item (through the call to btrfs_add_nondir()). So fix this by including two more transaction units. Signed-off-by: Filipe Manana Signed-off-by: Sasha Levin (cherry picked from commit a1f535acffbd95ae6ae81656e8bba39af094c3f0) Signed-off-by: Dan Duval --- diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 1cfa27b3e6f1..155890a531b3 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -9515,9 +9515,11 @@ static int btrfs_symlink(struct inode *dir, struct dentry *dentry, /* * 2 items for inode item and ref * 2 items for dir items + * 1 item for updating parent inode item + * 1 item for the inline extent item * 1 item for xattr if selinux is on */ - trans = btrfs_start_transaction(root, 5); + trans = btrfs_start_transaction(root, 7); if (IS_ERR(trans)) return PTR_ERR(trans);