lkml.org 
[lkml]   [2018]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] f2fs: fix missing unlock(sbi->gc_mutex)
Date
This fixes missing unlock call.

Cc: <stable@vger.kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
fs/f2fs/super.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index b79677639108..2689a2cb56cc 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -1462,6 +1462,9 @@ static int f2fs_disable_checkpoint(struct f2fs_sb_info *sbi)

while (!f2fs_time_over(sbi, DISABLE_TIME)) {
err = f2fs_gc(sbi, true, false, NULL_SEGNO);
+
+ /* f2fs_gc guarantees unlock gc_mutex */
+ mutex_lock(&sbi->gc_mutex);
if (err == -ENODATA)
break;
if (err && err != -EAGAIN) {
--
2.19.0.605.g01d371f741-goog
\
 
 \ /
  Last update: 2018-12-18 03:15    [W:2.071 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site