diff options
Diffstat (limited to 'fs/ubifs/file.c')
-rw-r--r-- | fs/ubifs/file.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c index 1009adc8d602..e90dd7ee2d3a 100644 --- a/fs/ubifs/file.c +++ b/fs/ubifs/file.c @@ -1311,6 +1311,9 @@ int ubifs_fsync(struct file *file, struct dentry *dentry, int datasync) dbg_gen("syncing inode %lu", inode->i_ino); + if (inode->i_sb->s_flags & MS_RDONLY) + return 0; + /* * VFS has already synchronized dirty pages for this inode. Synchronize * the inode unless this is a 'datasync()' call. |