From: Brian Foster <bfoster@redhat.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: linux-xfs@vger.kernel.org, hch@lst.de
Subject: Re: [PATCH 04/13] xfs: remove unnecessary xfs_qm_dqattach parameter
Date: Mon, 23 Apr 2018 09:54:35 -0400 [thread overview]
Message-ID: <20180423135434.GD43600@bfoster.bfoster> (raw)
In-Reply-To: <152440957769.29601.7369035661664268323.stgit@magnolia>
On Sun, Apr 22, 2018 at 08:06:17AM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
>
> The flags argument is always zero, get rid of it.
>
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
Reviewed-by: Brian Foster <bfoster@redhat.com>
> fs/xfs/libxfs/xfs_attr.c | 4 ++--
> fs/xfs/xfs_bmap_util.c | 6 +++---
> fs/xfs/xfs_inode.c | 10 +++++-----
> fs/xfs/xfs_iomap.c | 4 ++--
> fs/xfs/xfs_iops.c | 2 +-
> fs/xfs/xfs_qm.c | 7 +++----
> fs/xfs/xfs_quota.h | 4 ++--
> fs/xfs/xfs_reflink.c | 2 +-
> 8 files changed, 19 insertions(+), 20 deletions(-)
>
>
> diff --git a/fs/xfs/libxfs/xfs_attr.c b/fs/xfs/libxfs/xfs_attr.c
> index 35a1244..c3d02a6 100644
> --- a/fs/xfs/libxfs/xfs_attr.c
> +++ b/fs/xfs/libxfs/xfs_attr.c
> @@ -236,7 +236,7 @@ xfs_attr_set(
> args.op_flags = XFS_DA_OP_ADDNAME | XFS_DA_OP_OKNOENT;
> args.total = xfs_attr_calc_size(&args, &local);
>
> - error = xfs_qm_dqattach(dp, 0);
> + error = xfs_qm_dqattach(dp);
> if (error)
> return error;
>
> @@ -427,7 +427,7 @@ xfs_attr_remove(
> */
> args.op_flags = XFS_DA_OP_OKNOENT;
>
> - error = xfs_qm_dqattach(dp, 0);
> + error = xfs_qm_dqattach(dp);
> if (error)
> return error;
>
> diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c
> index 8cd8c41..65b2cc2 100644
> --- a/fs/xfs/xfs_bmap_util.c
> +++ b/fs/xfs/xfs_bmap_util.c
> @@ -848,7 +848,7 @@ xfs_free_eofblocks(
> /*
> * Attach the dquots to the inode up front.
> */
> - error = xfs_qm_dqattach(ip, 0);
> + error = xfs_qm_dqattach(ip);
> if (error)
> return error;
>
> @@ -918,7 +918,7 @@ xfs_alloc_file_space(
> if (XFS_FORCED_SHUTDOWN(mp))
> return -EIO;
>
> - error = xfs_qm_dqattach(ip, 0);
> + error = xfs_qm_dqattach(ip);
> if (error)
> return error;
>
> @@ -1169,7 +1169,7 @@ xfs_free_file_space(
>
> trace_xfs_free_file_space(ip);
>
> - error = xfs_qm_dqattach(ip, 0);
> + error = xfs_qm_dqattach(ip);
> if (error)
> return error;
>
> diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
> index 2b70c8b..1da9863 100644
> --- a/fs/xfs/xfs_inode.c
> +++ b/fs/xfs/xfs_inode.c
> @@ -1411,11 +1411,11 @@ xfs_link(
> if (XFS_FORCED_SHUTDOWN(mp))
> return -EIO;
>
> - error = xfs_qm_dqattach(sip, 0);
> + error = xfs_qm_dqattach(sip);
> if (error)
> goto std_return;
>
> - error = xfs_qm_dqattach(tdp, 0);
> + error = xfs_qm_dqattach(tdp);
> if (error)
> goto std_return;
>
> @@ -1911,7 +1911,7 @@ xfs_inactive(
> ip->i_d.di_nextents > 0 || ip->i_delayed_blks > 0))
> truncate = 1;
>
> - error = xfs_qm_dqattach(ip, 0);
> + error = xfs_qm_dqattach(ip);
> if (error)
> return;
>
> @@ -2574,11 +2574,11 @@ xfs_remove(
> if (XFS_FORCED_SHUTDOWN(mp))
> return -EIO;
>
> - error = xfs_qm_dqattach(dp, 0);
> + error = xfs_qm_dqattach(dp);
> if (error)
> goto std_return;
>
> - error = xfs_qm_dqattach(ip, 0);
> + error = xfs_qm_dqattach(ip);
> if (error)
> goto std_return;
>
> diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c
> index 046469f..58b04ea 100644
> --- a/fs/xfs/xfs_iomap.c
> +++ b/fs/xfs/xfs_iomap.c
> @@ -224,7 +224,7 @@ xfs_iomap_write_direct(
> * necessary and move on to transaction setup.
> */
> xfs_iunlock(ip, lockmode);
> - error = xfs_qm_dqattach(ip, 0);
> + error = xfs_qm_dqattach(ip);
> if (error)
> return error;
>
> @@ -692,7 +692,7 @@ xfs_iomap_write_allocate(
> /*
> * Make sure that the dquots are there.
> */
> - error = xfs_qm_dqattach(ip, 0);
> + error = xfs_qm_dqattach(ip);
> if (error)
> return error;
>
> diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c
> index a3ed3c8..5afe3c2 100644
> --- a/fs/xfs/xfs_iops.c
> +++ b/fs/xfs/xfs_iops.c
> @@ -855,7 +855,7 @@ xfs_setattr_size(
> /*
> * Make sure that the dquots are attached to the inode.
> */
> - error = xfs_qm_dqattach(ip, 0);
> + error = xfs_qm_dqattach(ip);
> if (error)
> return error;
>
> diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c
> index ec39ae2..d919b85 100644
> --- a/fs/xfs/xfs_qm.c
> +++ b/fs/xfs/xfs_qm.c
> @@ -381,8 +381,7 @@ xfs_qm_dqattach_locked(
>
> int
> xfs_qm_dqattach(
> - struct xfs_inode *ip,
> - uint flags)
> + struct xfs_inode *ip)
> {
> int error;
>
> @@ -390,7 +389,7 @@ xfs_qm_dqattach(
> return 0;
>
> xfs_ilock(ip, XFS_ILOCK_EXCL);
> - error = xfs_qm_dqattach_locked(ip, flags);
> + error = xfs_qm_dqattach_locked(ip, 0);
> xfs_iunlock(ip, XFS_ILOCK_EXCL);
>
> return error;
> @@ -1933,7 +1932,7 @@ xfs_qm_vop_rename_dqattach(
> */
> if (i == 0 || ip != i_tab[i-1]) {
> if (XFS_NOT_DQATTACHED(mp, ip)) {
> - error = xfs_qm_dqattach(ip, 0);
> + error = xfs_qm_dqattach(ip);
> if (error)
> return error;
> }
> diff --git a/fs/xfs/xfs_quota.h b/fs/xfs/xfs_quota.h
> index ce6506a..a4d3922 100644
> --- a/fs/xfs/xfs_quota.h
> +++ b/fs/xfs/xfs_quota.h
> @@ -90,7 +90,7 @@ extern struct xfs_dquot *xfs_qm_vop_chown(struct xfs_trans *,
> extern int xfs_qm_vop_chown_reserve(struct xfs_trans *, struct xfs_inode *,
> struct xfs_dquot *, struct xfs_dquot *,
> struct xfs_dquot *, uint);
> -extern int xfs_qm_dqattach(struct xfs_inode *, uint);
> +extern int xfs_qm_dqattach(struct xfs_inode *);
> extern int xfs_qm_dqattach_locked(struct xfs_inode *, uint);
> extern void xfs_qm_dqdetach(struct xfs_inode *);
> extern void xfs_qm_dqrele(struct xfs_dquot *);
> @@ -132,7 +132,7 @@ static inline int xfs_trans_reserve_quota_bydquots(struct xfs_trans *tp,
> #define xfs_qm_vop_rename_dqattach(it) (0)
> #define xfs_qm_vop_chown(tp, ip, old, new) (NULL)
> #define xfs_qm_vop_chown_reserve(tp, ip, u, g, p, fl) (0)
> -#define xfs_qm_dqattach(ip, fl) (0)
> +#define xfs_qm_dqattach(ip) (0)
> #define xfs_qm_dqattach_locked(ip, fl) (0)
> #define xfs_qm_dqdetach(ip)
> #define xfs_qm_dqrele(d)
> diff --git a/fs/xfs/xfs_reflink.c b/fs/xfs/xfs_reflink.c
> index cdbd342..fd8e6af 100644
> --- a/fs/xfs/xfs_reflink.c
> +++ b/fs/xfs/xfs_reflink.c
> @@ -1359,7 +1359,7 @@ xfs_reflink_remap_range(
> goto out_unlock;
>
> /* Attach dquots to dest inode before changing block map */
> - ret = xfs_qm_dqattach(dest, 0);
> + ret = xfs_qm_dqattach(dest);
> if (ret)
> goto out_unlock;
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2018-04-23 13:54 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-22 15:05 [PATCH 00/13] xfs-4.18: quota refactor Darrick J. Wong
2018-04-22 15:05 ` [PATCH 01/13] xfs: refactor XFS_QMOPT_DQNEXT out of existence Darrick J. Wong
2018-04-23 13:54 ` Brian Foster
2018-04-23 17:13 ` Christoph Hellwig
2018-04-22 15:06 ` [PATCH 02/13] xfs: refactor dquot cache handling Darrick J. Wong
2018-04-23 13:54 ` Brian Foster
2018-04-23 17:14 ` Christoph Hellwig
2018-04-22 15:06 ` [PATCH 03/13] xfs: delegate dqget input checks to helper function Darrick J. Wong
2018-04-23 13:54 ` Brian Foster
2018-04-23 17:19 ` Christoph Hellwig
2018-04-22 15:06 ` [PATCH 04/13] xfs: remove unnecessary xfs_qm_dqattach parameter Darrick J. Wong
2018-04-23 13:54 ` Brian Foster [this message]
2018-04-23 17:19 ` Christoph Hellwig
2018-04-22 15:06 ` [PATCH 05/13] xfs: split out dqget for inodes from regular dqget Darrick J. Wong
2018-04-23 13:54 ` Brian Foster
2018-04-23 17:23 ` Christoph Hellwig
2018-04-23 21:57 ` Darrick J. Wong
2018-04-22 15:06 ` [PATCH 06/13] xfs: fetch dquots directly during quotacheck Darrick J. Wong
2018-04-23 13:54 ` Brian Foster
2018-04-23 17:25 ` Christoph Hellwig
2018-04-22 15:06 ` [PATCH 07/13] xfs: refactor incore dquot initialization functions Darrick J. Wong
2018-04-23 13:54 ` Brian Foster
2018-04-23 17:27 ` Christoph Hellwig
2018-04-24 16:01 ` Eric Sandeen
2018-04-22 15:06 ` [PATCH 08/13] xfs: refactor xfs_qm_dqtobp and xfs_qm_dqalloc Darrick J. Wong
2018-04-23 17:31 ` Christoph Hellwig
2018-04-24 13:07 ` Brian Foster
2018-04-24 14:08 ` Darrick J. Wong
2018-04-22 15:06 ` [PATCH 09/13] xfs: remove xfs_qm_dqread flags argument Darrick J. Wong
2018-04-23 17:32 ` Christoph Hellwig
2018-04-28 6:38 ` Darrick J. Wong
2018-04-22 15:07 ` [PATCH 10/13] xfs: replace XFS_QMOPT_DQALLOC with XFS_DQGET_{ALLOC, EXISTS} Darrick J. Wong
2018-04-23 17:33 ` Christoph Hellwig
2018-04-24 13:07 ` Brian Foster
2018-04-24 14:08 ` Darrick J. Wong
2018-04-22 15:07 ` [PATCH 11/13] xfs: report failing address when dquot verifier fails Darrick J. Wong
2018-04-23 17:33 ` Christoph Hellwig
2018-04-22 15:07 ` [PATCH 12/13] xfs: rename on-disk dquot counter zap functions Darrick J. Wong
2018-04-23 17:35 ` Christoph Hellwig
2018-04-28 6:47 ` Darrick J. Wong
2018-04-22 15:07 ` [PATCH 13/13] xfs: refactor dquot iteration Darrick J. Wong
2018-04-24 13:08 ` Brian Foster
2018-04-24 14:04 ` Darrick J. Wong
-- strict thread matches above, loose matches on Subject: below --
2018-04-30 5:43 [PATCH v2 00/13] xfs-4.18: quota refactor Darrick J. Wong
2018-04-30 5:43 ` [PATCH 04/13] xfs: remove unnecessary xfs_qm_dqattach parameter Darrick J. Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180423135434.GD43600@bfoster.bfoster \
--to=bfoster@redhat.com \
--cc=darrick.wong@oracle.com \
--cc=hch@lst.de \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).