Message ID | 1600255152-16086-4-git-send-email-kaixuxia@tencent.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | xfs: remove the unnecessary xfs_dqid_t type cast | expand |
n Wed, Sep 16, 2020 at 07:19:06PM +0800, xiakaixu1987@gmail.com wrote: > From: Kaixu Xia <kaixuxia@tencent.com> > > Since the type prid_t and xfs_dqid_t both are uint32_t, seems the > type cast is unnecessary, so remove it. > > Signed-off-by: Kaixu Xia <kaixuxia@tencent.com> Looks ok, Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> --D > --- > fs/xfs/xfs_qm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c > index 3f82e0c92c2d..41a459ffd1f2 100644 > --- a/fs/xfs/xfs_qm.c > +++ b/fs/xfs/xfs_qm.c > @@ -1715,7 +1715,7 @@ xfs_qm_vop_dqalloc( > if ((flags & XFS_QMOPT_PQUOTA) && XFS_IS_PQUOTA_ON(mp)) { > if (ip->i_d.di_projid != prid) { > xfs_iunlock(ip, lockflags); > - error = xfs_qm_dqget(mp, (xfs_dqid_t)prid, > + error = xfs_qm_dqget(mp, prid, > XFS_DQTYPE_PROJ, true, &pq); > if (error) { > ASSERT(error != -ENOENT); > -- > 2.20.0 >
On Wed, Sep 16, 2020 at 07:19:06PM +0800, xiakaixu1987@gmail.com wrote: > From: Kaixu Xia <kaixuxia@tencent.com> > > Since the type prid_t and xfs_dqid_t both are uint32_t, seems the > type cast is unnecessary, so remove it. Looks good, Reviewed-by: Christoph Hellwig <hch@lst.de>
diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c index 3f82e0c92c2d..41a459ffd1f2 100644 --- a/fs/xfs/xfs_qm.c +++ b/fs/xfs/xfs_qm.c @@ -1715,7 +1715,7 @@ xfs_qm_vop_dqalloc( if ((flags & XFS_QMOPT_PQUOTA) && XFS_IS_PQUOTA_ON(mp)) { if (ip->i_d.di_projid != prid) { xfs_iunlock(ip, lockflags); - error = xfs_qm_dqget(mp, (xfs_dqid_t)prid, + error = xfs_qm_dqget(mp, prid, XFS_DQTYPE_PROJ, true, &pq); if (error) { ASSERT(error != -ENOENT);