[RFC PATCH 2/4] Define a new function xfs_inode_dquot()
Christoph Hellwig
hch at infradead.org
Tue Jan 24 11:48:50 CST 2012
On Mon, Jan 23, 2012 at 11:31:30AM -0600, Chandra Seetharaman wrote:
> Define a new function xfs_inode_dquot() that takes a inode pointer
> and a disk quota type and returns the quota pointer for the specified
> quota type.
>
> This simplifies the xfs_qm_dqget() error path significantly.
Looks good,
Reviewed-by: Christoph Hellwig <hch at lst.de>
> +static inline xfs_dquot_t *xfs_inode_dquot(struct xfs_inode *ip, int type)
> +{
> + type &= XFS_DQ_ALLTYPES;
> + switch(type) {
Same style nitpick as for the last patch.
Btw, instead of masking out XFS_DQ_ALLTYPES first this would be more
readable as:
switch (type & XFS_DQ_ALLTYPES) {
(that also applies to the previous patch).
More information about the xfs
mailing list