On 2024/3/22 12:16, Yeongjin Gil wrote:
If f2fs_evict_inode is called between freeze_super and thaw_super, the
s_writer rwsem count may become negative, resulting in hang.

CPU1 CPU2

f2fs_resize_fs()           f2fs_evict_inode()
   f2fs_freeze
     set SBI_IS_FREEZING
                              skip sb_start_intwrite
   f2fs_unfreeze
     clear SBI_IS_FREEZING
                              sb_end_intwrite

To solve this problem, the call to sb_end_write is determined by whether
sb_start_intwrite is called, rather than the current freezing status.

Reviewed-by: Sungjong Seo <sj1557....@samsung.com>
Reviewed-by: Sunmin Jeong <s_min.je...@samsung.com>
Signed-off-by: Yeongjin Gil <youngjin....@samsung.com>

Reviewed-by: Chao Yu <c...@kernel.org>

Thanks,


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to