diff options
author | Chao Yu <chao@kernel.org> | 2023-05-14 16:07:23 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2023-06-12 13:04:07 -0700 |
commit | f082c6b205a06953f26c40bdc7621cc5a58ceb7c (patch) | |
tree | 6f30d70a6dab8be29ad65f98d66ef4823aa3ad87 /drivers | |
parent | 36ded4c106db2434754c9bdcabdbdb52117be35f (diff) |
f2fs: fix potential deadlock due to unpaired node_write lock use
If S_NOQUOTA is cleared from inode during data page writeback of quota
file, it may miss to unlock node_write lock, result in potential
deadlock, fix to use the lock in paired.
Kworker Thread
- writepage
if (IS_NOQUOTA())
f2fs_down_read(&sbi->node_write);
- vfs_cleanup_quota_inode
- inode->i_flags &= ~S_NOQUOTA;
if (IS_NOQUOTA())
f2fs_up_read(&sbi->node_write);
Fixes: 79963d967b49 ("f2fs: shrink node_write lock coverage")
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions