mirror of
https://github.com/torvalds/linux.git
synced 2026-06-06 21:45:45 +02:00
f2fs: fix to account missing .skipped_gc_rwsem
[ Upstream commitad126ebdde] There is a missing place we forgot to account .skipped_gc_rwsem, fix it. Fixes:6f8d445506("f2fs: avoid fi->i_gc_rwsem[WRITE] lock in f2fs_gc") Signed-off-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
fd69f613af
commit
45cb5f86c1
|
|
@ -1477,8 +1477,10 @@ static int gc_data_segment(struct f2fs_sb_info *sbi, struct f2fs_summary *sum,
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
if (S_ISREG(inode->i_mode)) {
|
if (S_ISREG(inode->i_mode)) {
|
||||||
if (!down_write_trylock(&fi->i_gc_rwsem[READ]))
|
if (!down_write_trylock(&fi->i_gc_rwsem[READ])) {
|
||||||
|
sbi->skipped_gc_rwsem++;
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
if (!down_write_trylock(
|
if (!down_write_trylock(
|
||||||
&fi->i_gc_rwsem[WRITE])) {
|
&fi->i_gc_rwsem[WRITE])) {
|
||||||
sbi->skipped_gc_rwsem++;
|
sbi->skipped_gc_rwsem++;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user