mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
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>
This commit is contained in:
committed by
Jan Kara
parent
63936ddaa1
commit
759bfee658
11
fs/attr.c
11
fs/attr.c
@@ -12,7 +12,6 @@
|
||||
#include <linux/capability.h>
|
||||
#include <linux/fsnotify.h>
|
||||
#include <linux/fcntl.h>
|
||||
#include <linux/quotaops.h>
|
||||
#include <linux/security.h>
|
||||
|
||||
/* Taken over from the old code... */
|
||||
@@ -212,14 +211,8 @@ int notify_change(struct dentry * dentry, struct iattr * attr)
|
||||
error = inode->i_op->setattr(dentry, attr);
|
||||
} else {
|
||||
error = inode_change_ok(inode, attr);
|
||||
if (!error) {
|
||||
if ((ia_valid & ATTR_UID && attr->ia_uid != inode->i_uid) ||
|
||||
(ia_valid & ATTR_GID && attr->ia_gid != inode->i_gid))
|
||||
error = vfs_dq_transfer(inode, attr) ?
|
||||
-EDQUOT : 0;
|
||||
if (!error)
|
||||
error = inode_setattr(inode, attr);
|
||||
}
|
||||
if (!error)
|
||||
error = inode_setattr(inode, attr);
|
||||
}
|
||||
|
||||
if (ia_valid & ATTR_SIZE)
|
||||
|
Reference in New Issue
Block a user