aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/file.c')
-rw-r--r--fs/ocfs2/file.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index b1ae4c754157..4ffa715be09c 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -1028,6 +1028,11 @@ int ocfs2_setattr(struct dentry *dentry, struct iattr *attr)
1028 } 1028 }
1029 1029
1030 if (size_change && attr->ia_size != i_size_read(inode)) { 1030 if (size_change && attr->ia_size != i_size_read(inode)) {
1031 if (attr->ia_size > sb->s_maxbytes) {
1032 status = -EFBIG;
1033 goto bail_unlock;
1034 }
1035
1031 if (i_size_read(inode) > attr->ia_size) 1036 if (i_size_read(inode) > attr->ia_size)
1032 status = ocfs2_truncate_file(inode, bh, attr->ia_size); 1037 status = ocfs2_truncate_file(inode, bh, attr->ia_size);
1033 else 1038 else