aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jbd2/commit.c
diff options
context:
space:
mode:
authorMichal Hocko <[email protected]>2016-10-11 20:56:01 +0000
committerLinus Torvalds <[email protected]>2016-10-11 22:06:33 +0000
commit5114a97a8bce7f4ead29a32b67dee85438699b9e (patch)
tree1033f6f06e9d19d79271a82f09b9d43114953a42 /fs/jbd2/commit.c
parenttreewide: remove redundant #include <linux/kconfig.h> (diff)
downloadkernel-5114a97a8bce7f4ead29a32b67dee85438699b9e.tar.gz
kernel-5114a97a8bce7f4ead29a32b67dee85438699b9e.zip
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. [[email protected]: be honest about conversion from -ENXIO to -EIO] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Michal Hocko <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'fs/jbd2/commit.c')
-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,
* filemap_fdatawait_range(), set it again so
* that user process can get -EIO from fsync().
*/
- set_bit(AS_EIO,
- &jinode->i_vfs_inode->i_mapping->flags);
+ mapping_set_error(jinode->i_vfs_inode->i_mapping, -EIO);
if (!ret)
ret = err;