Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 63902
b: refs/heads/master
c: ce76fd3
h: refs/heads/master
v: v3
  • Loading branch information
Mark Fasheh committed Aug 10, 2007
1 parent 83932ae commit 8ac740c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7c08d70c69150148c14f02633855f1591219c37c
refs/heads/master: ce76fd30ce98cdaeb38dca0dfbb3fa6d2801c5ce
5 changes: 5 additions & 0 deletions trunk/fs/ocfs2/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -1028,6 +1028,11 @@ int ocfs2_setattr(struct dentry *dentry, struct iattr *attr)
}

if (size_change && attr->ia_size != i_size_read(inode)) {
if (attr->ia_size > sb->s_maxbytes) {
status = -EFBIG;
goto bail_unlock;
}

if (i_size_read(inode) > attr->ia_size)
status = ocfs2_truncate_file(inode, bh, attr->ia_size);
else
Expand Down

0 comments on commit 8ac740c

Please sign in to comment.