diff options
author | Filipe Manana <fdmanana@suse.com> | 2015-12-31 18:16:29 +0000 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2016-04-13 17:14:20 -0400 |
commit | a1f535acffbd95ae6ae81656e8bba39af094c3f0 (patch) | |
tree | 92ec10121c1baf669ac32f381b3448dc888084ce /fs/btrfs/inode.c | |
parent | e92c51b734d57e04f0c9b43106b5294834339be6 (diff) |
Btrfs: fix number of transaction units required to create symlink
[ 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 <fdmanana@suse.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
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 2e9ffa42b1cf..62af0d3b0e4f 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -9518,9 +9518,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); |