From: Brian Foster <bfoster@redhat.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>,
Christoph Hellwig <hch@lst.de>,
linux-xfs@vger.kernel.org, hch@infradead.org,
david@fromorbit.com
Subject: Re: [PATCH 15/16] xfs: rename code to error in xfs_ioctl_setattr
Date: Tue, 2 Feb 2021 08:13:37 -0500 [thread overview]
Message-ID: <20210202131337.GE3336100@bfoster> (raw)
In-Reply-To: <161223148300.491593.4733623201150889540.stgit@magnolia>
On Mon, Feb 01, 2021 at 06:04:43PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> Rename the 'code' variable to 'error' to follow the naming convention of
> most other functions in xfs.
>
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> ---
Reviewed-by: Brian Foster <bfoster@redhat.com>
> fs/xfs/xfs_ioctl.c | 38 +++++++++++++++++++-------------------
> 1 file changed, 19 insertions(+), 19 deletions(-)
>
>
> diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
> index 78ee201eb7cb..38ee66d999d8 100644
> --- a/fs/xfs/xfs_ioctl.c
> +++ b/fs/xfs/xfs_ioctl.c
> @@ -1435,13 +1435,13 @@ xfs_ioctl_setattr(
> struct xfs_trans *tp;
> struct xfs_dquot *pdqp = NULL;
> struct xfs_dquot *olddquot = NULL;
> - int code;
> + int error;
>
> trace_xfs_ioctl_setattr(ip);
>
> - code = xfs_ioctl_setattr_check_projid(ip, fa);
> - if (code)
> - return code;
> + error = xfs_ioctl_setattr_check_projid(ip, fa);
> + if (error)
> + return error;
>
> /*
> * If disk quotas is on, we make sure that the dquots do exist on disk,
> @@ -1452,36 +1452,36 @@ xfs_ioctl_setattr(
> * because the i_*dquot fields will get updated anyway.
> */
> if (XFS_IS_QUOTA_ON(mp)) {
> - code = xfs_qm_vop_dqalloc(ip, VFS_I(ip)->i_uid,
> + error = xfs_qm_vop_dqalloc(ip, VFS_I(ip)->i_uid,
> VFS_I(ip)->i_gid, fa->fsx_projid,
> XFS_QMOPT_PQUOTA, NULL, NULL, &pdqp);
> - if (code)
> - return code;
> + if (error)
> + return error;
> }
>
> xfs_ioctl_setattr_prepare_dax(ip, fa);
>
> tp = xfs_ioctl_setattr_get_trans(ip, pdqp);
> if (IS_ERR(tp)) {
> - code = PTR_ERR(tp);
> + error = PTR_ERR(tp);
> goto error_free_dquots;
> }
>
> xfs_fill_fsxattr(ip, false, &old_fa);
> - code = vfs_ioc_fssetxattr_check(VFS_I(ip), &old_fa, fa);
> - if (code)
> + error = vfs_ioc_fssetxattr_check(VFS_I(ip), &old_fa, fa);
> + if (error)
> goto error_trans_cancel;
>
> - code = xfs_ioctl_setattr_check_extsize(ip, fa);
> - if (code)
> + error = xfs_ioctl_setattr_check_extsize(ip, fa);
> + if (error)
> goto error_trans_cancel;
>
> - code = xfs_ioctl_setattr_check_cowextsize(ip, fa);
> - if (code)
> + error = xfs_ioctl_setattr_check_cowextsize(ip, fa);
> + if (error)
> goto error_trans_cancel;
>
> - code = xfs_ioctl_setattr_xflags(tp, ip, fa);
> - if (code)
> + error = xfs_ioctl_setattr_xflags(tp, ip, fa);
> + if (error)
> goto error_trans_cancel;
>
> /*
> @@ -1521,7 +1521,7 @@ xfs_ioctl_setattr(
> else
> ip->i_d.di_cowextsize = 0;
>
> - code = xfs_trans_commit(tp);
> + error = xfs_trans_commit(tp);
>
> /*
> * Release any dquot(s) the inode had kept before chown.
> @@ -1529,13 +1529,13 @@ xfs_ioctl_setattr(
> xfs_qm_dqrele(olddquot);
> xfs_qm_dqrele(pdqp);
>
> - return code;
> + return error;
>
> error_trans_cancel:
> xfs_trans_cancel(tp);
> error_free_dquots:
> xfs_qm_dqrele(pdqp);
> - return code;
> + return error;
> }
>
> STATIC int
>
next prev parent reply other threads:[~2021-02-02 13:20 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-02 2:03 [PATCHSET v6 00/16] xfs: minor cleanups of the quota functions Darrick J. Wong
2021-02-02 2:03 ` [PATCH 01/16] xfs: fix chown leaking delalloc quota blocks when fssetxattr fails Darrick J. Wong
2021-02-02 13:13 ` Brian Foster
2021-02-02 17:47 ` Darrick J. Wong
2021-02-02 17:56 ` Christoph Hellwig
2021-02-02 18:34 ` Brian Foster
2021-02-02 19:38 ` [PATCH v6.1 " Darrick J. Wong
2021-02-02 2:03 ` [PATCH 02/16] xfs: clean up quota reservation callsites Darrick J. Wong
2021-02-02 2:03 ` [PATCH 03/16] xfs: create convenience wrappers for incore quota block reservations Darrick J. Wong
2021-02-02 2:03 ` [PATCH 04/16] xfs: remove xfs_trans_unreserve_quota_nblks completely Darrick J. Wong
2021-02-02 2:03 ` [PATCH 05/16] xfs: clean up icreate quota reservation calls Darrick J. Wong
2021-02-02 2:03 ` [PATCH 06/16] xfs: fix up build warnings when quotas are disabled Darrick J. Wong
2021-02-02 2:03 ` [PATCH 07/16] xfs: reduce quota reservation when doing a dax unwritten extent conversion Darrick J. Wong
2021-02-02 2:04 ` [PATCH 08/16] xfs: reserve data and rt quota at the same time Darrick J. Wong
2021-02-02 2:04 ` [PATCH 09/16] xfs: refactor common transaction/inode/quota allocation idiom Darrick J. Wong
2021-02-02 2:04 ` [PATCH 10/16] xfs: allow reservation of rtblocks with xfs_trans_alloc_inode Darrick J. Wong
2021-02-02 2:04 ` [PATCH 11/16] xfs: refactor reflink functions to use xfs_trans_alloc_inode Darrick J. Wong
2021-02-02 2:04 ` [PATCH 12/16] xfs: refactor inode creation transaction/inode/quota allocation idiom Darrick J. Wong
2021-02-02 2:04 ` [PATCH 13/16] xfs: refactor inode ownership change " Darrick J. Wong
2021-02-02 7:04 ` Christoph Hellwig
2021-02-02 13:13 ` Brian Foster
2021-02-02 2:04 ` [PATCH 14/16] xfs: remove xfs_qm_vop_chown_reserve Darrick J. Wong
2021-02-02 7:05 ` Christoph Hellwig
2021-02-02 13:13 ` Brian Foster
2021-02-02 2:04 ` [PATCH 15/16] xfs: rename code to error in xfs_ioctl_setattr Darrick J. Wong
2021-02-02 13:13 ` Brian Foster [this message]
2021-02-02 2:04 ` [PATCH 16/16] xfs: shut down the filesystem if we screw up quota errors Darrick J. Wong
2021-02-02 13:13 ` Brian Foster
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=20210202131337.GE3336100@bfoster \
--to=bfoster@redhat.com \
--cc=chaitanya.kulkarni@wdc.com \
--cc=david@fromorbit.com \
--cc=djwong@kernel.org \
--cc=hch@infradead.org \
--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