diff options
Diffstat (limited to 'fs/attr.c')
-rw-r--r-- | fs/attr.c | 13 |
1 files changed, 3 insertions, 10 deletions
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/capability.h> | 12 | #include <linux/capability.h> |
13 | #include <linux/fsnotify.h> | 13 | #include <linux/fsnotify.h> |
14 | #include <linux/fcntl.h> | 14 | #include <linux/fcntl.h> |
15 | #include <linux/quotaops.h> | ||
16 | #include <linux/security.h> | 15 | #include <linux/security.h> |
17 | 16 | ||
18 | /* Taken over from the old code... */ | 17 | /* Taken over from the old code... */ |
@@ -82,7 +81,7 @@ int inode_newsize_ok(const struct inode *inode, loff_t offset) | |||
82 | if (inode->i_size < offset) { | 81 | if (inode->i_size < offset) { |
83 | unsigned long limit; | 82 | unsigned long limit; |
84 | 83 | ||
85 | limit = current->signal->rlim[RLIMIT_FSIZE].rlim_cur; | 84 | limit = rlimit(RLIMIT_FSIZE); |
86 | if (limit != RLIM_INFINITY && offset > limit) | 85 | if (limit != RLIM_INFINITY && offset > limit) |
87 | goto out_sig; | 86 | goto out_sig; |
88 | if (offset > inode->i_sb->s_maxbytes) | 87 | if (offset > inode->i_sb->s_maxbytes) |
@@ -212,14 +211,8 @@ int notify_change(struct dentry * dentry, struct iattr * attr) | |||
212 | error = inode->i_op->setattr(dentry, attr); | 211 | error = inode->i_op->setattr(dentry, attr); |
213 | } else { | 212 | } else { |
214 | error = inode_change_ok(inode, attr); | 213 | error = inode_change_ok(inode, attr); |
215 | if (!error) { | 214 | if (!error) |
216 | if ((ia_valid & ATTR_UID && attr->ia_uid != inode->i_uid) || | 215 | error = inode_setattr(inode, attr); |
217 | (ia_valid & ATTR_GID && attr->ia_gid != inode->i_gid)) | ||
218 | error = vfs_dq_transfer(inode, attr) ? | ||
219 | -EDQUOT : 0; | ||
220 | if (!error) | ||
221 | error = inode_setattr(inode, attr); | ||
222 | } | ||
223 | } | 216 | } |
224 | 217 | ||
225 | if (ia_valid & ATTR_SIZE) | 218 | if (ia_valid & ATTR_SIZE) |