diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2013-07-12 06:34:42 -0400 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2013-07-12 06:34:42 -0400 |
| commit | f2006e27396f55276f24434f56e208d86e7f9908 (patch) | |
| tree | 71896db916d33888b4286f80117d3cac0da40e6d /fs/ext3/fsync.c | |
| parent | e399eb56a6110e13f97e644658648602e2b08de7 (diff) | |
| parent | 9903883f1dd6e86f286b7bfa6e4b423f98c1cd9e (diff) | |
Merge branch 'linus' into timers/urgent
Get upstream changes so we can apply fixes against them
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'fs/ext3/fsync.c')
| -rw-r--r-- | fs/ext3/fsync.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/ext3/fsync.c b/fs/ext3/fsync.c index b31dbd4c46ad..1cb9c7e10c6f 100644 --- a/fs/ext3/fsync.c +++ b/fs/ext3/fsync.c | |||
| @@ -48,9 +48,13 @@ int ext3_sync_file(struct file *file, loff_t start, loff_t end, int datasync) | |||
| 48 | 48 | ||
| 49 | trace_ext3_sync_file_enter(file, datasync); | 49 | trace_ext3_sync_file_enter(file, datasync); |
| 50 | 50 | ||
| 51 | if (inode->i_sb->s_flags & MS_RDONLY) | 51 | if (inode->i_sb->s_flags & MS_RDONLY) { |
| 52 | /* Make sure that we read updated state */ | ||
| 53 | smp_rmb(); | ||
| 54 | if (EXT3_SB(inode->i_sb)->s_mount_state & EXT3_ERROR_FS) | ||
| 55 | return -EROFS; | ||
| 52 | return 0; | 56 | return 0; |
| 53 | 57 | } | |
| 54 | ret = filemap_write_and_wait_range(inode->i_mapping, start, end); | 58 | ret = filemap_write_and_wait_range(inode->i_mapping, start, end); |
| 55 | if (ret) | 59 | if (ret) |
| 56 | goto out; | 60 | goto out; |
