Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f575610 authored by Filipe Manana's avatar Filipe Manana Committed by Sasha Levin
Browse files

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: default avatarFilipe Manana <fdmanana@suse.com>
Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
parent 52558f04
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -9150,9 +9150,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);