summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/super.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2018-12-18 02:08:26 +0100
committerJaegeuk Kim <jaegeuk@kernel.org>2018-12-27 00:16:55 +0100
commit8f31b4665c14fe19593601a250275e58c7ad0ef1 (patch)
tree48245f428dc04bc974a41d2acf42f24705f042b1 /fs/f2fs/super.c
parentf2fs: fix to dirty inode synchronously (diff)
downloadlinux-8f31b4665c14fe19593601a250275e58c7ad0ef1.tar.xz
linux-8f31b4665c14fe19593601a250275e58c7ad0ef1.zip
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>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r--fs/f2fs/super.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index b79677639108..cec7ef27b389 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)