OSDN Git Service

btrfs: open-code remount flag setting in btrfs_remount
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Wed, 22 Jul 2020 15:18:04 +0000 (00:18 +0900)
committerDavid Sterba <dsterba@suse.com>
Mon, 27 Jul 2020 10:55:47 +0000 (12:55 +0200)
commit88c4703f00a9e8ab60133690cfdaccea6c07e560
treebeb88df3aac44a52137d25c5bd8332bd668f278f
parent162e0a16b7d93629c8325ea32d99b38d17bc03eb
btrfs: open-code remount flag setting in btrfs_remount

When we're (re)mounting a btrfs filesystem we set the
BTRFS_FS_STATE_REMOUNTING state in fs_info to serialize against async
reclaim or defrags.

This flag is set in btrfs_remount_prepare() called by btrfs_remount().
As btrfs_remount_prepare() does nothing but setting this flag and
doesn't have a second caller, we can just open-code the flag setting in
btrfs_remount().

Similarly do for so clearing of the flag by moving it out of
btrfs_remount_cleanup() into btrfs_remount() to be symmetrical.

Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/super.c