diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-12-17 17:08:26 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-01-09 17:46:01 +0100 |
commit | 56a8f57bf771d4a87dc917216fbaeb32b042675f (patch) | |
tree | e41cc26e90749059180d44b0bdef8424690b1649 | |
parent | 8bfc9902d3415abef57eb22484561503683783d1 (diff) |
f2fs: fix missing unlock(sbi->gc_mutex)
commit 8f31b4665c14fe19593601a250275e58c7ad0ef1 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | fs/f2fs/super.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index af58b2cc21b8..b17dde1c3a28 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -1457,19 +1457,16 @@ static int f2fs_disable_checkpoint(struct f2fs_sb_info *sbi) sbi->sb->s_flags |= SB_ACTIVE; - mutex_lock(&sbi->gc_mutex); f2fs_update_time(sbi, DISABLE_TIME); while (!f2fs_time_over(sbi, DISABLE_TIME)) { + mutex_lock(&sbi->gc_mutex); err = f2fs_gc(sbi, true, false, NULL_SEGNO); if (err == -ENODATA) break; - if (err && err != -EAGAIN) { - mutex_unlock(&sbi->gc_mutex); + if (err && err != -EAGAIN) return err; - } } - mutex_unlock(&sbi->gc_mutex); err = sync_filesystem(sbi->sb); if (err) |