VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Christoph Hellwig <hch@lst.de> 2009-05-11 23:35:03 +0200 committer: Al Viro <viro@zeniv.linux.org.uk> 2009-06-11 21:36:09 -0400 commit: ebc1ac164560a241d9bf1b7519062910c3f90a01 parent: 01ba687577647beef6c5f2ea59bfb56fac9fcde2
Commit Summary:
->write_super lock_super pushdown
Diffstat:
1 file changed, 5 insertions, 3 deletions
diff --git a/fs/hfs/super.c b/fs/hfs/super.c
index 9f5eaa01cc77..3aac41751030 100644
--- a/fs/hfs/super.c
+++ b/fs/hfs/super.c
@@ -49,11 +49,13 @@ MODULE_LICENSE("GPL");
  */
 static void hfs_write_super(struct super_block *sb)
 {
+	lock_super(sb);
 	sb->s_dirt = 0;
-	if (sb->s_flags & MS_RDONLY)
-		return;
+
 	/* sync everything to the buffers */
-	hfs_mdb_commit(sb);
+	if (!(sb->s_flags & MS_RDONLY))
+		hfs_mdb_commit(sb);
+	unlock_super(sb);
 }
 
 /*