diff options
Diffstat (limited to 'fs/ocfs2/file.c')
-rw-r--r-- | fs/ocfs2/file.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index d77d71ead8d1..fcd970636bbf 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c | |||
@@ -185,6 +185,9 @@ static int ocfs2_sync_file(struct file *file, loff_t start, loff_t end, | |||
185 | file->f_path.dentry->d_name.name, | 185 | file->f_path.dentry->d_name.name, |
186 | (unsigned long long)datasync); | 186 | (unsigned long long)datasync); |
187 | 187 | ||
188 | if (ocfs2_is_hard_readonly(osb) || ocfs2_is_soft_readonly(osb)) | ||
189 | return -EROFS; | ||
190 | |||
188 | err = filemap_write_and_wait_range(inode->i_mapping, start, end); | 191 | err = filemap_write_and_wait_range(inode->i_mapping, start, end); |
189 | if (err) | 192 | if (err) |
190 | return err; | 193 | return err; |