btrfs: reserve correct number of items for rename
authorOmar Sandoval <osandov@fb.com>
Thu, 10 Mar 2022 01:31:32 +0000 (17:31 -0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 16 May 2022 15:03:06 +0000 (17:03 +0200)
commitc16218714307849a949f83cbad00b1b4ec166bb6
tree94a3e94d0b3a80adb0fb21bb1814f826c660d62e
parentbca4ad7c0b547b01ed4bd244dc54be18ba6cc708
btrfs: reserve correct number of items for rename

btrfs_rename() and btrfs_rename_exchange() don't account for enough
items. Replace the incorrect explanations with a specific breakdown of
the number of items and account them accurately.

Note that this glosses over RENAME_WHITEOUT because the next commit is
going to rework that, too.

Reviewed-by: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>
Signed-off-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c