diff options
author | Filipe Manana <fdmanana@suse.com> | 2015-12-31 18:16:29 +0000 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2016-03-03 12:46:01 +0100 |
commit | 6f751109450760d466d678ea4971e54b0bb63273 (patch) | |
tree | fbe6149d9b4375ef6add93214f5590c3873d6891 | |
parent | 6aa9b83f7f4370a314753b30ba2010472963b66a (diff) | |
download | lwn-6f751109450760d466d678ea4971e54b0bb63273.tar.gz lwn-6f751109450760d466d678ea4971e54b0bb63273.zip |
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: Jiri Slaby <jslaby@suse.cz>
-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 c6f91432cc67..89b5868ccfc7 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -8417,9 +8417,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); |