diff options
author | Filipe Manana <fdmanana@suse.com> | 2015-12-31 21:16:29 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-03-04 02:07:11 +0300 |
commit | c6362a1e3e428e101c0fc089b496f30e06b7e3c5 (patch) | |
tree | 4e7426f49d4060c6242d2a6f2adf69cc1aeb0fe2 /fs/btrfs/inode.c | |
parent | d70554d661868f8fb87a5eda236a69b1e9b0e615 (diff) | |
download | linux-c6362a1e3e428e101c0fc089b496f30e06b7e3c5.tar.xz |
Btrfs: fix number of transaction units required to create symlink
commit 9269d12b2d57d9e3d13036bb750762d1110d425c upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index bbf081de2ab1..a93e36343688 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -9663,9 +9663,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); |