summaryrefslogtreecommitdiffstats
path: root/fs/ext4/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/file.c')
-rw-r--r--fs/ext4/file.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/ext4/file.c b/fs/ext4/file.c
index 2c5baa5e8291..f4a24a46245e 100644
--- a/fs/ext4/file.c
+++ b/fs/ext4/file.c
@@ -165,6 +165,10 @@ static ssize_t ext4_write_checks(struct kiocb *iocb, struct iov_iter *from)
165 ret = generic_write_checks(iocb, from); 165 ret = generic_write_checks(iocb, from);
166 if (ret <= 0) 166 if (ret <= 0)
167 return ret; 167 return ret;
168
169 if (unlikely(IS_IMMUTABLE(inode)))
170 return -EPERM;
171
168 /* 172 /*
169 * If we have encountered a bitmap-format file, the size limit 173 * If we have encountered a bitmap-format file, the size limit
170 * is smaller than s_maxbytes, which is for extent-mapped files. 174 * is smaller than s_maxbytes, which is for extent-mapped files.