forked from Minki/linux
f2fs: fix missing unlock(sbi->gc_mutex)
This fixes missing unlock call. Cc: <stable@vger.kernel.org> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
b32e019049
commit
8f31b4665c
@ -1457,19 +1457,16 @@ static int f2fs_disable_checkpoint(struct f2fs_sb_info *sbi)
|
|||||||
|
|
||||||
sbi->sb->s_flags |= SB_ACTIVE;
|
sbi->sb->s_flags |= SB_ACTIVE;
|
||||||
|
|
||||||
mutex_lock(&sbi->gc_mutex);
|
|
||||||
f2fs_update_time(sbi, DISABLE_TIME);
|
f2fs_update_time(sbi, DISABLE_TIME);
|
||||||
|
|
||||||
while (!f2fs_time_over(sbi, DISABLE_TIME)) {
|
while (!f2fs_time_over(sbi, DISABLE_TIME)) {
|
||||||
|
mutex_lock(&sbi->gc_mutex);
|
||||||
err = f2fs_gc(sbi, true, false, NULL_SEGNO);
|
err = f2fs_gc(sbi, true, false, NULL_SEGNO);
|
||||||
if (err == -ENODATA)
|
if (err == -ENODATA)
|
||||||
break;
|
break;
|
||||||
if (err && err != -EAGAIN) {
|
if (err && err != -EAGAIN)
|
||||||
mutex_unlock(&sbi->gc_mutex);
|
|
||||||
return err;
|
return err;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
mutex_unlock(&sbi->gc_mutex);
|
|
||||||
|
|
||||||
err = sync_filesystem(sbi->sb);
|
err = sync_filesystem(sbi->sb);
|
||||||
if (err)
|
if (err)
|
||||||
|
Loading…
Reference in New Issue
Block a user