aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2009-05-05 09:41:25 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2009-06-11 21:36:06 -0400
commit5af7926ff33b68b3ba46531471c6e0564b285efc (patch)
treea25266f9db482ce9dd8e663148ffb0f1a524bd83 /fs/ubifs
parente5004753388dcf5e1b8a52ac0ab807d232340fbb (diff)
enforce ->sync_fs is only called for rw superblock
Make sure a superblock really is writeable by checking MS_RDONLY under s_umount. sync_filesystems needed some re-arragement for that, but all but one sync_filesystem caller had the correct locking already so that we could add that check there. cachefiles grew s_umount locking. I've also added a WARN_ON to sync_filesystem to assert this for future callers. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ubifs')
-rw-r--r--fs/ubifs/super.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index e9f7a754c4f7..84f3c7fd1552 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -447,9 +447,6 @@ static int ubifs_sync_fs(struct super_block *sb, int wait)
447 if (!wait) 447 if (!wait)
448 return 0; 448 return 0;
449 449
450 if (sb->s_flags & MS_RDONLY)
451 return 0;
452
453 /* 450 /*
454 * VFS calls '->sync_fs()' before synchronizing all dirty inodes and 451 * VFS calls '->sync_fs()' before synchronizing all dirty inodes and
455 * pages, so synchronize them first, then commit the journal. Strictly 452 * pages, so synchronize them first, then commit the journal. Strictly