btrfs: start orphan cleanup on ro->rw remount
authorBoris Burkov <boris@bur.io>
Wed, 18 Nov 2020 23:06:17 +0000 (15:06 -0800)
committerDavid Sterba <dsterba@suse.com>
Wed, 9 Dec 2020 18:16:07 +0000 (19:16 +0100)
commit8f1c21d7490fc1ac5ef364b7085987ca439fb32f
tree0e11aad09db6f5400aec20a3ef479cc8e7173697
parent44c0ca211a4da92513fffc545b5374b45b0c4fc5
btrfs: start orphan cleanup on ro->rw remount

When we mount a rw filesystem, we start the orphan cleanup process in
tree root and filesystem tree. However, when we remount a ro file system
rw, we only clean the former. Move the calls to btrfs_orphan_cleanup()
on tree_root and fs_root to the shared rw mount routine to effectively
add them on ro->rw remount.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Boris Burkov <boris@bur.io>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/disk-io.c