]> www.infradead.org Git - nvme.git/commit
btrfs: remove pointless code when creating and deleting a subvolume
authorFilipe Manana <fdmanana@suse.com>
Thu, 6 Jun 2024 08:20:18 +0000 (09:20 +0100)
committerDavid Sterba <dsterba@suse.com>
Thu, 11 Jul 2024 13:33:24 +0000 (15:33 +0200)
commitebc7c7678eb04b739544d9caaa0a4797adb24392
tree2ba3d7f95d66179f35f4dfc644ab053a16088f65
parent6d81df75af5a5cfb8bfc0a17cd3e43cb927216ab
btrfs: remove pointless code when creating and deleting a subvolume

When creating and deleting a subvolume, after starting a transaction we
are explicitly calling btrfs_record_root_in_trans() for the root which we
passed to btrfs_start_transaction(). This is pointless because at
transaction.c:start_transaction() we end up doing that call, regardless
of whether we actually start a new transaction or join an existing one,
and if we were not it would mean the root item of that root would not
be updated in the root tree when committing the transaction, leading to
problems easy to spot with fstests for example.

Remove these redundant calls. They were introduced with commit
74e97958121a ("btrfs: qgroup: fix qgroup prealloc rsv leak in subvolume
operations").

Reviewed-by: Boris Burkov <boris@bur.io>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c
fs/btrfs/ioctl.c