diff options
author | Christoph Hellwig <hch@infradead.org> | 2010-03-03 09:05:02 -0500 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2010-03-04 18:20:28 -0500 |
commit | 759bfee658beab14af7b357156461d0eb852be2c (patch) | |
tree | 180cdedd004781ee67c30ce89951324d32910067 /fs/jfs/acl.c | |
parent | 63936ddaa16b9486e2d426ed7b09f559a5c60f87 (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/jfs/acl.c')
-rw-r--r-- | fs/jfs/acl.c | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/fs/jfs/acl.c b/fs/jfs/acl.c index d66477c34306..213169780b6c 100644 --- a/fs/jfs/acl.c +++ b/fs/jfs/acl.c | |||
@@ -20,7 +20,6 @@ | |||
20 | 20 | ||
21 | #include <linux/sched.h> | 21 | #include <linux/sched.h> |
22 | #include <linux/fs.h> | 22 | #include <linux/fs.h> |
23 | #include <linux/quotaops.h> | ||
24 | #include <linux/posix_acl_xattr.h> | 23 | #include <linux/posix_acl_xattr.h> |
25 | #include "jfs_incore.h" | 24 | #include "jfs_incore.h" |
26 | #include "jfs_txnmgr.h" | 25 | #include "jfs_txnmgr.h" |
@@ -174,7 +173,7 @@ cleanup: | |||
174 | return rc; | 173 | return rc; |
175 | } | 174 | } |
176 | 175 | ||
177 | static int jfs_acl_chmod(struct inode *inode) | 176 | int jfs_acl_chmod(struct inode *inode) |
178 | { | 177 | { |
179 | struct posix_acl *acl, *clone; | 178 | struct posix_acl *acl, *clone; |
180 | int rc; | 179 | int rc; |
@@ -205,26 +204,3 @@ static int jfs_acl_chmod(struct inode *inode) | |||
205 | posix_acl_release(clone); | 204 | posix_acl_release(clone); |
206 | return rc; | 205 | return rc; |
207 | } | 206 | } |
208 | |||
209 | int jfs_setattr(struct dentry *dentry, struct iattr *iattr) | ||
210 | { | ||
211 | struct inode *inode = dentry->d_inode; | ||
212 | int rc; | ||
213 | |||
214 | rc = inode_change_ok(inode, iattr); | ||
215 | if (rc) | ||
216 | return rc; | ||
217 | |||
218 | if ((iattr->ia_valid & ATTR_UID && iattr->ia_uid != inode->i_uid) || | ||
219 | (iattr->ia_valid & ATTR_GID && iattr->ia_gid != inode->i_gid)) { | ||
220 | if (vfs_dq_transfer(inode, iattr)) | ||
221 | return -EDQUOT; | ||
222 | } | ||
223 | |||
224 | rc = inode_setattr(inode, iattr); | ||
225 | |||
226 | if (!rc && (iattr->ia_valid & ATTR_MODE)) | ||
227 | rc = jfs_acl_chmod(inode); | ||
228 | |||
229 | return rc; | ||
230 | } | ||