[PATCH] f2fs: move put_gc_inode into gc_mutex

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There in no any lock to protect gc_inode list so let's move into
gc_mutex, otherwise it might be lost links of list.

Signed-off-by: Changman Lee <cm224.lee@xxxxxxxxxxx>
---
 fs/f2fs/gc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 657683c9..99e1720 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -733,9 +733,9 @@ gc_more:
 	if (gc_type == FG_GC)
 		write_checkpoint(sbi, &cpc);
 stop:
-	mutex_unlock(&sbi->gc_mutex);
-
 	put_gc_inode(&ilist);
+
+	mutex_unlock(&sbi->gc_mutex);
 	return ret;
 }
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux