summaryrefslogtreecommitdiffstats
path: root/fs/jbd2
diff options
context:
space:
mode:
authorMichal Hocko <mhocko@suse.com>2016-10-11 16:56:01 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-10-11 18:06:33 -0400
commit5114a97a8bce7f4ead29a32b67dee85438699b9e (patch)
tree1033f6f06e9d19d79271a82f09b9d43114953a42 /fs/jbd2
parent97139d4a6f26445de47b378cddd5192c0278f863 (diff)
fs: use mapping_set_error instead of opencoded set_bit
The mapping_set_error() helper sets the correct AS_ flag for the mapping so there is no reason to open code it. Use the helper directly. [akpm@linux-foundation.org: be honest about conversion from -ENXIO to -EIO] Link: http://lkml.kernel.org/r/20160912111608.2588-2-mhocko@kernel.org Signed-off-by: Michal Hocko <mhocko@suse.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/jbd2')
-rw-r--r--fs/jbd2/commit.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c
index 5bb565f9989c..31f8ca046639 100644
--- a/fs/jbd2/commit.c
+++ b/fs/jbd2/commit.c
@@ -269,8 +269,7 @@ static int journal_finish_inode_data_buffers(journal_t *journal,
269 * filemap_fdatawait_range(), set it again so 269 * filemap_fdatawait_range(), set it again so
270 * that user process can get -EIO from fsync(). 270 * that user process can get -EIO from fsync().
271 */ 271 */
272 set_bit(AS_EIO, 272 mapping_set_error(jinode->i_vfs_inode->i_mapping, -EIO);
273 &jinode->i_vfs_inode->i_mapping->flags);
274 273
275 if (!ret) 274 if (!ret)
276 ret = err; 275 ret = err;