summaryrefslogtreecommitdiff
path: root/fs/ext4/xattr.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2017-02-05 09:28:48 +0300
committerTheodore Ts'o <tytso@mit.edu>2017-02-05 09:28:48 +0300
commit0db1ff222d40f1601c961f0edb86d10426992595 (patch)
tree74c6613fb9f3fba41ff3fc90e0db69d9df20490c /fs/ext4/xattr.c
parent9549a168bd500db1a76914e50775f7cd1690acef (diff)
downloadlinux-0db1ff222d40f1601c961f0edb86d10426992595.tar.xz
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/xattr.c')
-rw-r--r--fs/ext4/xattr.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index c40bd55b6400..67636acf7624 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -411,6 +411,9 @@ ext4_xattr_get(struct inode *inode, int name_index, const char *name,
{
int error;
+ if (unlikely(ext4_forced_shutdown(EXT4_SB(inode->i_sb))))
+ return -EIO;
+
if (strlen(name) > 255)
return -ERANGE;