f2fs: don't get FREEZE lock in f2fs_evict_inode in frozen fs
authorJaegeuk Kim <jaegeuk@kernel.org>
Fri, 4 Mar 2022 17:40:05 +0000 (09:40 -0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 11 Mar 2022 15:36:17 +0000 (07:36 -0800)
commitba900534f807f0b327c92d5141c85d2313e2d55c
tree313fe2dbeadaa494354d0ad00b1335f4381e5d05
parentd13732cc0cc920ee58d45a38d8472769171aaa1d
f2fs: don't get FREEZE lock in f2fs_evict_inode in frozen fs

Let's purge inode cache in order to avoid the below deadlock.

[freeze test]                         shrinkder
freeze_super
 - pwercpu_down_write(SB_FREEZE_FS)
                                       - super_cache_scan
                                         - down_read(&sb->s_umount)
                                           - prune_icache_sb
                                            - dispose_list
                                             - evict
                                              - f2fs_evict_inode
thaw_super
 - down_write(&sb->s_umount);
                                              - __percpu_down_read(SB_FREEZE_FS)

Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Documentation/ABI/testing/sysfs-fs-f2fs
fs/f2fs/debug.c
fs/f2fs/f2fs.h
fs/f2fs/inode.c
fs/f2fs/super.c