Skip to content

Commit

Permalink
ocfs2: send SIGXFSZ if new filesize exceeds limit -v2
Browse files Browse the repository at this point in the history
This patch makes ocfs2 send SIGXFSZ if new file size exceeds the rlimit.
Processes may get SIGXFSZ on one node (in the cluster) while others will
not on another if file size limits are different on the two nodes.

Signed-off-by: Wengang Wang <[email protected]>
Signed-off-by: Joel Becker <[email protected]>
  • Loading branch information
Wengang-oracle authored and Joel Becker committed Feb 28, 2010
1 parent 6fcef3f commit 5051f76
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions fs/ocfs2/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -993,10 +993,9 @@ 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;
status = inode_newsize_ok(inode, attr->ia_size);
if (status)
goto bail_unlock;
}

if (i_size_read(inode) > attr->ia_size) {
if (ocfs2_should_order_data(inode)) {
Expand Down

0 comments on commit 5051f76

Please sign in to comment.