Skip to content

Commit 9269d12

Browse files
committed
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 <[email protected]>
1 parent d50866d commit 9269d12

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fs/btrfs/inode.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9660,9 +9660,11 @@ static int btrfs_symlink(struct inode *dir, struct dentry *dentry,
96609660
/*
96619661
* 2 items for inode item and ref
96629662
* 2 items for dir items
9663+
* 1 item for updating parent inode item
9664+
* 1 item for the inline extent item
96639665
* 1 item for xattr if selinux is on
96649666
*/
9665-
trans = btrfs_start_transaction(root, 5);
9667+
trans = btrfs_start_transaction(root, 7);
96669668
if (IS_ERR(trans))
96679669
return PTR_ERR(trans);
96689670

0 commit comments

Comments
 (0)