]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/ubifs/file.c
UBIFS: use ro_mount instead of MS_RDONLY
[karo-tx-linux.git] / fs / ubifs / file.c
index 3594aae12a88e5324165cfc5343a026c484cdfe9..adce3b7b5a3ed3b2cffcc9e3c64a6f18f373a0b3 100644 (file)
@@ -1312,7 +1312,11 @@ int ubifs_fsync(struct file *file, int datasync)
 
        dbg_gen("syncing inode %lu", inode->i_ino);
 
-       if (inode->i_sb->s_flags & MS_RDONLY)
+       if (c->ro_mount)
+               /*
+                * For some really strange reasons VFS does not filter out
+                * 'fsync()' for R/O mounted file-systems as per 2.6.39.
+                */
                return 0;
 
        /*