aboutsummaryrefslogtreecommitdiffstats
path: root/fs/attr.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2010-03-03 09:05:02 -0500
committerJan Kara <jack@suse.cz>2010-03-04 18:20:28 -0500
commit759bfee658beab14af7b357156461d0eb852be2c (patch)
tree180cdedd004781ee67c30ce89951324d32910067 /fs/attr.c
parent63936ddaa16b9486e2d426ed7b09f559a5c60f87 (diff)
dquot: move dquot transfer responsibility into the filesystem
Currently notify_change calls vfs_dq_transfer directly. This means we tie the quota code into the VFS. Get rid of that and make the filesystem responsible for the transfer. Most filesystems already do this, only ufs and udf need the code added, and for jfs it needs to be enabled unconditionally instead of only when ACLs are enabled. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/attr.c')
-rw-r--r--fs/attr.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/fs/attr.c b/fs/attr.c
index 96d394bdaddf..0a6ea54cde7d 100644
--- a/fs/attr.c
+++ b/fs/attr.c
@@ -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... */
@@ -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)