summaryrefslogtreecommitdiffstats
path: root/fs/ext4/page-io.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2017-02-05 01:28:48 -0500
committerTheodore Ts'o <tytso@mit.edu>2017-02-05 01:28:48 -0500
commit0db1ff222d40f1601c961f0edb86d10426992595 (patch)
tree74c6613fb9f3fba41ff3fc90e0db69d9df20490c /fs/ext4/page-io.c
parent9549a168bd500db1a76914e50775f7cd1690acef (diff)
downloadop-kernel-dev-0db1ff222d40f1601c961f0edb86d10426992595.zip
op-kernel-dev-0db1ff222d40f1601c961f0edb86d10426992595.tar.gz
ext4: add shutdown bit and check for it
Add a shutdown bit that will cause ext4 processing to fail immediately with EIO. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/page-io.c')
-rw-r--r--fs/ext4/page-io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c
index d83b0f3..f880883 100644
--- a/fs/ext4/page-io.c
+++ b/fs/ext4/page-io.c
@@ -158,7 +158,7 @@ static int ext4_end_io(ext4_io_end_t *io)
io->handle = NULL; /* Following call will use up the handle */
ret = ext4_convert_unwritten_extents(handle, inode, offset, size);
- if (ret < 0) {
+ if (ret < 0 && !ext4_forced_shutdown(EXT4_SB(inode->i_sb))) {
ext4_msg(inode->i_sb, KERN_EMERG,
"failed to convert unwritten extents to written "
"extents -- potential data loss! "
OpenPOWER on IntegriCloud