Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Wengang Wang and committed by
Joel Becker
5051f768 6fcef3f0

+2 -3
+2 -3
fs/ocfs2/file.c
··· 993 993 } 994 994 995 995 if (size_change && attr->ia_size != i_size_read(inode)) { 996 - if (attr->ia_size > sb->s_maxbytes) { 997 - status = -EFBIG; 996 + status = inode_newsize_ok(inode, attr->ia_size); 997 + if (status) 998 998 goto bail_unlock; 999 - } 1000 999 1001 1000 if (i_size_read(inode) > attr->ia_size) { 1002 1001 if (ocfs2_should_order_data(inode)) {