summaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@suse.com>2015-12-31 18:16:29 +0000
committerFilipe Manana <fdmanana@suse.com>2015-12-31 18:18:40 +0000
commit9269d12b2d57d9e3d13036bb750762d1110d425c (patch)
tree5fe57a6dab211c2aa0f98066a3f9076c9304b175 /fs/btrfs
parentd50866d00fb39fcf72307001763ee9cc92625a43 (diff)
downloadlinux-stable-9269d12b2d57d9e3d13036bb750762d1110d425c.tar.gz
linux-stable-9269d12b2d57d9e3d13036bb750762d1110d425c.tar.bz2
linux-stable-9269d12b2d57d9e3d13036bb750762d1110d425c.zip
Btrfs: fix number of transaction units required to create symlink
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 <fdmanana@suse.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/inode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 2ea2e0edc956..5dbc07a7c220 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -9660,9 +9660,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);