diff options
-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 16a6444330ec..98ae58cdbd41 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. |