mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
dquot: cleanup dquot initialize routine
Get rid of the initialize dquot operation - it is now always called from the filesystem and if a filesystem really needs it's own (which none currently does) it can just call into it's own routine directly. Rename the now static low-level dquot_initialize helper to __dquot_initialize and vfs_dq_init to dquot_initialize to have a consistent namespace. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Jan Kara <[email protected]>
This commit is contained in:
parent
907f4554e2
commit
871a293155
39 changed files with 141 additions and 145 deletions
|
|
@ -99,7 +99,7 @@ int jfs_setattr(struct dentry *dentry, struct iattr *iattr)
|
|||
return rc;
|
||||
|
||||
if (iattr->ia_valid & ATTR_SIZE)
|
||||
vfs_dq_init(inode);
|
||||
dquot_initialize(inode);
|
||||
if ((iattr->ia_valid & ATTR_UID && iattr->ia_uid != inode->i_uid) ||
|
||||
(iattr->ia_valid & ATTR_GID && iattr->ia_gid != inode->i_gid)) {
|
||||
rc = dquot_transfer(inode, iattr);
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ void jfs_delete_inode(struct inode *inode)
|
|||
jfs_info("In jfs_delete_inode, inode = 0x%p", inode);
|
||||
|
||||
if (!is_bad_inode(inode))
|
||||
vfs_dq_init(inode);
|
||||
dquot_initialize(inode);
|
||||
|
||||
if (!is_bad_inode(inode) &&
|
||||
(JFS_IP(inode)->fileset == FILESYSTEM_I)) {
|
||||
|
|
@ -161,7 +161,7 @@ void jfs_delete_inode(struct inode *inode)
|
|||
/*
|
||||
* Free the inode from the quota allocation.
|
||||
*/
|
||||
vfs_dq_init(inode);
|
||||
dquot_initialize(inode);
|
||||
dquot_free_inode(inode);
|
||||
dquot_drop(inode);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ struct inode *ialloc(struct inode *parent, umode_t mode)
|
|||
/*
|
||||
* Allocate inode to quota.
|
||||
*/
|
||||
vfs_dq_init(inode);
|
||||
dquot_initialize(inode);
|
||||
rc = dquot_alloc_inode(inode);
|
||||
if (rc)
|
||||
goto fail_drop;
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ static int jfs_create(struct inode *dip, struct dentry *dentry, int mode,
|
|||
|
||||
jfs_info("jfs_create: dip:0x%p name:%s", dip, dentry->d_name.name);
|
||||
|
||||
vfs_dq_init(dip);
|
||||
dquot_initialize(dip);
|
||||
|
||||
/*
|
||||
* search parent directory for entry/freespace
|
||||
|
|
@ -217,7 +217,7 @@ static int jfs_mkdir(struct inode *dip, struct dentry *dentry, int mode)
|
|||
|
||||
jfs_info("jfs_mkdir: dip:0x%p name:%s", dip, dentry->d_name.name);
|
||||
|
||||
vfs_dq_init(dip);
|
||||
dquot_initialize(dip);
|
||||
|
||||
/* link count overflow on parent directory ? */
|
||||
if (dip->i_nlink == JFS_LINK_MAX) {
|
||||
|
|
@ -360,8 +360,8 @@ static int jfs_rmdir(struct inode *dip, struct dentry *dentry)
|
|||
jfs_info("jfs_rmdir: dip:0x%p name:%s", dip, dentry->d_name.name);
|
||||
|
||||
/* Init inode for quota operations. */
|
||||
vfs_dq_init(dip);
|
||||
vfs_dq_init(ip);
|
||||
dquot_initialize(dip);
|
||||
dquot_initialize(ip);
|
||||
|
||||
/* directory must be empty to be removed */
|
||||
if (!dtEmpty(ip)) {
|
||||
|
|
@ -488,8 +488,8 @@ static int jfs_unlink(struct inode *dip, struct dentry *dentry)
|
|||
jfs_info("jfs_unlink: dip:0x%p name:%s", dip, dentry->d_name.name);
|
||||
|
||||
/* Init inode for quota operations. */
|
||||
vfs_dq_init(dip);
|
||||
vfs_dq_init(ip);
|
||||
dquot_initialize(dip);
|
||||
dquot_initialize(ip);
|
||||
|
||||
if ((rc = get_UCSname(&dname, dentry)))
|
||||
goto out;
|
||||
|
|
@ -811,7 +811,7 @@ static int jfs_link(struct dentry *old_dentry,
|
|||
if (ip->i_nlink == 0)
|
||||
return -ENOENT;
|
||||
|
||||
vfs_dq_init(dir);
|
||||
dquot_initialize(dir);
|
||||
|
||||
tid = txBegin(ip->i_sb, 0);
|
||||
|
||||
|
|
@ -904,7 +904,7 @@ static int jfs_symlink(struct inode *dip, struct dentry *dentry,
|
|||
|
||||
jfs_info("jfs_symlink: dip:0x%p name:%s", dip, name);
|
||||
|
||||
vfs_dq_init(dip);
|
||||
dquot_initialize(dip);
|
||||
|
||||
ssize = strlen(name) + 1;
|
||||
|
||||
|
|
@ -1097,8 +1097,8 @@ static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry,
|
|||
jfs_info("jfs_rename: %s %s", old_dentry->d_name.name,
|
||||
new_dentry->d_name.name);
|
||||
|
||||
vfs_dq_init(old_dir);
|
||||
vfs_dq_init(new_dir);
|
||||
dquot_initialize(old_dir);
|
||||
dquot_initialize(new_dir);
|
||||
|
||||
old_ip = old_dentry->d_inode;
|
||||
new_ip = new_dentry->d_inode;
|
||||
|
|
@ -1149,7 +1149,7 @@ static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry,
|
|||
} else if (new_ip) {
|
||||
IWRITE_LOCK(new_ip, RDWRLOCK_NORMAL);
|
||||
/* Init inode for quota operations. */
|
||||
vfs_dq_init(new_ip);
|
||||
dquot_initialize(new_ip);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -1373,7 +1373,7 @@ static int jfs_mknod(struct inode *dir, struct dentry *dentry,
|
|||
|
||||
jfs_info("jfs_mknod: %s", dentry->d_name.name);
|
||||
|
||||
vfs_dq_init(dir);
|
||||
dquot_initialize(dir);
|
||||
|
||||
if ((rc = get_UCSname(&dname, dentry)))
|
||||
goto out;
|
||||
|
|
|
|||
Loading…
Reference in a new issue