提交 5051f768 编写于 作者: W Wengang Wang 提交者: Joel Becker

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: NWengang Wang <wen.gang.wang@oracle.com>
Signed-off-by: NJoel Becker <joel.becker@oracle.com>
上级 6fcef3f0
......@@ -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)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册