[NILFS users] [PATCH] nilfs2: fix hang problem after rw-remount

Ryusuke Konishi ryusuke at osrg.net
Mon Jul 7 16:16:51 JST 2008


Dear Volkov and other folks,

I found another remount problem of NILFS2 that may be exposed when
using it for root partition.

On one of my test machines with a recent kernel, NILFS2 eventually
hung after remounting a read only filesystem to read/write mode.  Then
I found that a missing semaphore operation caused the problem.

Here I post a patch to fix the bug.  If you are bothered by that kind
of problem, try this patch please.

The patch is also available on the git tree found on
http://www.nilfs.org/git/, and will be included in the next release.

Regards,
Ryusuke Konishi

--
diff --git a/fs/super.c b/fs/super.c
index 9520efc..432910d 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -1093,6 +1093,7 @@ static int nilfs_remount(struct super_block *sb, int *flags, char *data)
 		if (err)
 			goto rw_remount_failed;
 
+		down_write(&nilfs->ns_sem);
 		nilfs_setup_super(sbi);
 		up_write(&nilfs->ns_sem);
 



More information about the users mailing list