From: Jaegeuk Kim Date: Tue, 18 Dec 2018 01:08:26 +0000 (-0800) Subject: f2fs: fix missing unlock(sbi->gc_mutex) X-Git-Tag: Ubuntu-5.2.0-15.16~2857^2~4 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=8f31b4665c14fe19593601a250275e58c7ad0ef1;p=mirror_ubuntu-eoan-kernel.git f2fs: fix missing unlock(sbi->gc_mutex) This fixes missing unlock call. Cc: Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim --- 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)