• Miao Xie's avatar
    Btrfs: remove unnecessary ->s_umount in cleaner_kthread() · d0278245
    Miao Xie authored
    In order to avoid the R/O remount, we acquired ->s_umount lock during
    we deleted the dead snapshots and subvolumes. But it is unnecessary,
    because we have cleaner_mutex.
    
    We use cleaner_mutex to protect the process of the dead snapshots/subvolumes
    deletion. And when we remount the fs to be R/O, we also acquire this mutex to
    do cleanup after we change the status of the fs. That is this lock can serialize
    the above operations, the cleaner can be aware of the status of the fs, and if
    the cleaner is deleting the dead snapshots/subvolumes, the remount task will
    wait for it. So it is safe to remove ->s_umount in cleaner_kthread().
    
    Cc: David Sterba <dsterba@suse.cz>
    Signed-off-by: default avatarMiao Xie <miaox@cn.fujitsu.com>
    Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
    d0278245
disk-io.c 108 KB