mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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 <[email protected]> Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
e500475338
commit
5af7926ff3
5 changed files with 27 additions and 25 deletions
|
|
@ -447,9 +447,6 @@ static int ubifs_sync_fs(struct super_block *sb, int wait)
|
|||
if (!wait)
|
||||
return 0;
|
||||
|
||||
if (sb->s_flags & MS_RDONLY)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* VFS calls '->sync_fs()' before synchronizing all dirty inodes and
|
||||
* pages, so synchronize them first, then commit the journal. Strictly
|
||||
|
|
|
|||
Loading…
Reference in a new issue