aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWengang Wang <wen.gang.wang@oracle.com>2010-02-26 05:18:25 -0500
committerJoel Becker <joel.becker@oracle.com>2010-02-27 23:08:51 -0500
commit5051f76883897ea3d3d034c92e7b84236da2ec57 (patch)
tree58893d2ed954046be420e59f5743fcb7c7a273a4
parent6fcef3f04a1a0f8d7a086147d2f2e650c8cc2754 (diff)
ocfs2: send SIGXFSZ if new filesize exceeds limit -v2
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 <wen.gang.wang@oracle.com> Signed-off-by: Joel Becker <joel.becker@oracle.com>
-rw-r--r--fs/ocfs2/file.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index c8a4a2939e55..5b52547d6299 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -993,10 +993,9 @@ int ocfs2_setattr(struct dentry *dentry, struct iattr *attr)
993 } 993 }
994 994
995 if (size_change && attr->ia_size != i_size_read(inode)) { 995 if (size_change && attr->ia_size != i_size_read(inode)) {
996 if (attr->ia_size > sb->s_maxbytes) { 996 status = inode_newsize_ok(inode, attr->ia_size);
997 status = -EFBIG; 997 if (status)
998 goto bail_unlock; 998 goto bail_unlock;
999 }
1000 999
1001 if (i_size_read(inode) > attr->ia_size) { 1000 if (i_size_read(inode) > attr->ia_size) {
1002 if (ocfs2_should_order_data(inode)) { 1001 if (ocfs2_should_order_data(inode)) {