Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b43fa828 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jan Kara
Browse files

dquot: cleanup dquot transfer routine



Get rid of the transfer 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_transfer helper to __dquot_transfer
and vfs_dq_transfer to dquot_transfer to have a consistent namespace,
and make the new dquot_transfer return a normal negative errno value
which all callers expect.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent 759bfee6
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -462,7 +462,6 @@ in sys_read() and friends.
prototypes:
	int (*initialize) (struct inode *, int);
	int (*drop) (struct inode *);
	int (*transfer) (struct inode *, struct iattr *);
	int (*write_dquot) (struct dquot *);
	int (*acquire_dquot) (struct dquot *);
	int (*release_dquot) (struct dquot *);
@@ -477,7 +476,6 @@ What filesystem should expect from the generic quota functions:
		FS recursion	Held locks when called
initialize:	yes		maybe dqonoff_sem
drop:		yes		-
transfer:	yes		-
write_dquot:	yes		dqonoff_sem or dqptr_sem
acquire_dquot:	yes		dqonoff_sem or dqptr_sem
release_dquot:	yes		dqonoff_sem or dqptr_sem
+1 −1
Original line number Diff line number Diff line
@@ -969,7 +969,7 @@ int pohmelfs_setattr_raw(struct inode *inode, struct iattr *attr)

	if ((attr->ia_valid & ATTR_UID && attr->ia_uid != inode->i_uid) ||
	    (attr->ia_valid & ATTR_GID && attr->ia_gid != inode->i_gid)) {
		err = vfs_dq_transfer(inode, attr) ? -EDQUOT : 0;
		err = dquot_transfer(inode, attr);
		if (err)
			goto err_out_exit;
	}
+1 −1
Original line number Diff line number Diff line
@@ -1459,7 +1459,7 @@ int ext2_setattr(struct dentry *dentry, struct iattr *iattr)
		return error;
	if ((iattr->ia_valid & ATTR_UID && iattr->ia_uid != inode->i_uid) ||
	    (iattr->ia_valid & ATTR_GID && iattr->ia_gid != inode->i_gid)) {
		error = vfs_dq_transfer(inode, iattr) ? -EDQUOT : 0;
		error = dquot_transfer(inode, iattr);
		if (error)
			return error;
	}
+1 −1
Original line number Diff line number Diff line
@@ -3160,7 +3160,7 @@ int ext3_setattr(struct dentry *dentry, struct iattr *attr)
			error = PTR_ERR(handle);
			goto err_out;
		}
		error = vfs_dq_transfer(inode, attr) ? -EDQUOT : 0;
		error = dquot_transfer(inode, attr);
		if (error) {
			ext3_journal_stop(handle);
			return error;
+0 −1
Original line number Diff line number Diff line
@@ -752,7 +752,6 @@ static ssize_t ext3_quota_write(struct super_block *sb, int type,
static const struct dquot_operations ext3_quota_operations = {
	.initialize	= dquot_initialize,
	.drop		= dquot_drop,
	.transfer	= dquot_transfer,
	.write_dquot	= ext3_write_dquot,
	.acquire_dquot	= ext3_acquire_dquot,
	.release_dquot	= ext3_release_dquot,
Loading