xfs: rename code to error in xfs_ioctl_setattr
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>
This commit is contained in:
parent
5c615f0feb
commit
fea7aae6ce
|
@ -1435,13 +1435,13 @@ xfs_ioctl_setattr(
|
||||||
struct xfs_trans *tp;
|
struct xfs_trans *tp;
|
||||||
struct xfs_dquot *pdqp = NULL;
|
struct xfs_dquot *pdqp = NULL;
|
||||||
struct xfs_dquot *olddquot = NULL;
|
struct xfs_dquot *olddquot = NULL;
|
||||||
int code;
|
int error;
|
||||||
|
|
||||||
trace_xfs_ioctl_setattr(ip);
|
trace_xfs_ioctl_setattr(ip);
|
||||||
|
|
||||||
code = xfs_ioctl_setattr_check_projid(ip, fa);
|
error = xfs_ioctl_setattr_check_projid(ip, fa);
|
||||||
if (code)
|
if (error)
|
||||||
return code;
|
return error;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If disk quotas is on, we make sure that the dquots do exist on disk,
|
* 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.
|
* because the i_*dquot fields will get updated anyway.
|
||||||
*/
|
*/
|
||||||
if (XFS_IS_QUOTA_ON(mp)) {
|
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,
|
VFS_I(ip)->i_gid, fa->fsx_projid,
|
||||||
XFS_QMOPT_PQUOTA, NULL, NULL, &pdqp);
|
XFS_QMOPT_PQUOTA, NULL, NULL, &pdqp);
|
||||||
if (code)
|
if (error)
|
||||||
return code;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
xfs_ioctl_setattr_prepare_dax(ip, fa);
|
xfs_ioctl_setattr_prepare_dax(ip, fa);
|
||||||
|
|
||||||
tp = xfs_ioctl_setattr_get_trans(ip, pdqp);
|
tp = xfs_ioctl_setattr_get_trans(ip, pdqp);
|
||||||
if (IS_ERR(tp)) {
|
if (IS_ERR(tp)) {
|
||||||
code = PTR_ERR(tp);
|
error = PTR_ERR(tp);
|
||||||
goto error_free_dquots;
|
goto error_free_dquots;
|
||||||
}
|
}
|
||||||
|
|
||||||
xfs_fill_fsxattr(ip, false, &old_fa);
|
xfs_fill_fsxattr(ip, false, &old_fa);
|
||||||
code = vfs_ioc_fssetxattr_check(VFS_I(ip), &old_fa, fa);
|
error = vfs_ioc_fssetxattr_check(VFS_I(ip), &old_fa, fa);
|
||||||
if (code)
|
if (error)
|
||||||
goto error_trans_cancel;
|
goto error_trans_cancel;
|
||||||
|
|
||||||
code = xfs_ioctl_setattr_check_extsize(ip, fa);
|
error = xfs_ioctl_setattr_check_extsize(ip, fa);
|
||||||
if (code)
|
if (error)
|
||||||
goto error_trans_cancel;
|
goto error_trans_cancel;
|
||||||
|
|
||||||
code = xfs_ioctl_setattr_check_cowextsize(ip, fa);
|
error = xfs_ioctl_setattr_check_cowextsize(ip, fa);
|
||||||
if (code)
|
if (error)
|
||||||
goto error_trans_cancel;
|
goto error_trans_cancel;
|
||||||
|
|
||||||
code = xfs_ioctl_setattr_xflags(tp, ip, fa);
|
error = xfs_ioctl_setattr_xflags(tp, ip, fa);
|
||||||
if (code)
|
if (error)
|
||||||
goto error_trans_cancel;
|
goto error_trans_cancel;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1521,7 +1521,7 @@ xfs_ioctl_setattr(
|
||||||
else
|
else
|
||||||
ip->i_d.di_cowextsize = 0;
|
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.
|
* Release any dquot(s) the inode had kept before chown.
|
||||||
|
@ -1529,13 +1529,13 @@ xfs_ioctl_setattr(
|
||||||
xfs_qm_dqrele(olddquot);
|
xfs_qm_dqrele(olddquot);
|
||||||
xfs_qm_dqrele(pdqp);
|
xfs_qm_dqrele(pdqp);
|
||||||
|
|
||||||
return code;
|
return error;
|
||||||
|
|
||||||
error_trans_cancel:
|
error_trans_cancel:
|
||||||
xfs_trans_cancel(tp);
|
xfs_trans_cancel(tp);
|
||||||
error_free_dquots:
|
error_free_dquots:
|
||||||
xfs_qm_dqrele(pdqp);
|
xfs_qm_dqrele(pdqp);
|
||||||
return code;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
STATIC int
|
STATIC int
|
||||||
|
|
Loading…
Reference in New Issue