]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commitdiff
xfs: remove unused parameter in macro XFS_DQUOT_LOGRES
authorJulian Sun <sunjunchao2870@gmail.com>
Wed, 2 Oct 2024 01:23:58 +0000 (18:23 -0700)
committerAndrey Albershteyn <aalbersh@redhat.com>
Fri, 4 Oct 2024 10:42:07 +0000 (12:42 +0200)
Source kernel commit: af5d92f2fad818663da2ce073b6fe15b9d56ffdc

In the macro definition of XFS_DQUOT_LOGRES, a parameter is accepted,
but it is not used. Hence, it should be removed.

This patch has only passed compilation test, but it should be fine.

Signed-off-by: Julian Sun <sunjunchao2870@gmail.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
libxfs/xfs_quota_defs.h
libxfs/xfs_trans_resv.c

index cb035da3f990b0d9db135678c7a09d70040cde58..fb05f44f6c754ac214145d8690a7e42ebc549ece 100644 (file)
@@ -56,7 +56,7 @@ typedef uint8_t               xfs_dqtype_t;
  * And, of course, we also need to take into account the dquot log format item
  * used to describe each dquot.
  */
-#define XFS_DQUOT_LOGRES(mp)   \
+#define XFS_DQUOT_LOGRES       \
        ((sizeof(struct xfs_dq_logformat) + sizeof(struct xfs_disk_dquot)) * 6)
 
 #define XFS_IS_QUOTA_ON(mp)            ((mp)->m_qflags & XFS_ALL_QUOTA_ACCT)
index a2cb4d63e34e3b26d842a999adf59c0fb203b90f..6b87bf4d554c6ac0c32efce9884793aefebd60a7 100644 (file)
@@ -335,11 +335,11 @@ xfs_calc_write_reservation(
                                        blksz);
                t1 += adj;
                t3 += adj;
-               return XFS_DQUOT_LOGRES(mp) + max3(t1, t2, t3);
+               return XFS_DQUOT_LOGRES + max3(t1, t2, t3);
        }
 
        t4 = xfs_calc_refcountbt_reservation(mp, 1);
-       return XFS_DQUOT_LOGRES(mp) + max(t4, max3(t1, t2, t3));
+       return XFS_DQUOT_LOGRES + max(t4, max3(t1, t2, t3));
 }
 
 unsigned int
@@ -407,11 +407,11 @@ xfs_calc_itruncate_reservation(
                                        xfs_refcountbt_block_count(mp, 4),
                                        blksz);
 
-               return XFS_DQUOT_LOGRES(mp) + max3(t1, t2, t3);
+               return XFS_DQUOT_LOGRES + max3(t1, t2, t3);
        }
 
        t4 = xfs_calc_refcountbt_reservation(mp, 2);
-       return XFS_DQUOT_LOGRES(mp) + max(t4, max3(t1, t2, t3));
+       return XFS_DQUOT_LOGRES + max(t4, max3(t1, t2, t3));
 }
 
 unsigned int
@@ -463,7 +463,7 @@ STATIC uint
 xfs_calc_rename_reservation(
        struct xfs_mount        *mp)
 {
-       unsigned int            overhead = XFS_DQUOT_LOGRES(mp);
+       unsigned int            overhead = XFS_DQUOT_LOGRES;
        struct xfs_trans_resv   *resp = M_RES(mp);
        unsigned int            t1, t2, t3 = 0;
 
@@ -574,7 +574,7 @@ STATIC uint
 xfs_calc_link_reservation(
        struct xfs_mount        *mp)
 {
-       unsigned int            overhead = XFS_DQUOT_LOGRES(mp);
+       unsigned int            overhead = XFS_DQUOT_LOGRES;
        struct xfs_trans_resv   *resp = M_RES(mp);
        unsigned int            t1, t2, t3 = 0;
 
@@ -638,7 +638,7 @@ STATIC uint
 xfs_calc_remove_reservation(
        struct xfs_mount        *mp)
 {
-       unsigned int            overhead = XFS_DQUOT_LOGRES(mp);
+       unsigned int            overhead = XFS_DQUOT_LOGRES;
        struct xfs_trans_resv   *resp = M_RES(mp);
        unsigned int            t1, t2, t3 = 0;
 
@@ -726,7 +726,7 @@ xfs_calc_icreate_reservation(
        struct xfs_mount        *mp)
 {
        struct xfs_trans_resv   *resp = M_RES(mp);
-       unsigned int            overhead = XFS_DQUOT_LOGRES(mp);
+       unsigned int            overhead = XFS_DQUOT_LOGRES;
        unsigned int            t1, t2, t3 = 0;
 
        t1 = xfs_calc_icreate_resv_alloc(mp);
@@ -744,7 +744,7 @@ STATIC uint
 xfs_calc_create_tmpfile_reservation(
        struct xfs_mount        *mp)
 {
-       uint    res = XFS_DQUOT_LOGRES(mp);
+       uint    res = XFS_DQUOT_LOGRES;
 
        res += xfs_calc_icreate_resv_alloc(mp);
        return res + xfs_calc_iunlink_add_reservation(mp);
@@ -826,7 +826,7 @@ STATIC uint
 xfs_calc_ifree_reservation(
        struct xfs_mount        *mp)
 {
-       return XFS_DQUOT_LOGRES(mp) +
+       return XFS_DQUOT_LOGRES +
                xfs_calc_inode_res(mp, 1) +
                xfs_calc_buf_res(3, mp->m_sb.sb_sectsize) +
                xfs_calc_iunlink_remove_reservation(mp) +
@@ -843,7 +843,7 @@ STATIC uint
 xfs_calc_ichange_reservation(
        struct xfs_mount        *mp)
 {
-       return XFS_DQUOT_LOGRES(mp) +
+       return XFS_DQUOT_LOGRES +
                xfs_calc_inode_res(mp, 1) +
                xfs_calc_buf_res(1, mp->m_sb.sb_sectsize);
 
@@ -952,7 +952,7 @@ STATIC uint
 xfs_calc_addafork_reservation(
        struct xfs_mount        *mp)
 {
-       return XFS_DQUOT_LOGRES(mp) +
+       return XFS_DQUOT_LOGRES +
                xfs_calc_inode_res(mp, 1) +
                xfs_calc_buf_res(2, mp->m_sb.sb_sectsize) +
                xfs_calc_buf_res(1, mp->m_dir_geo->blksize) +
@@ -1000,7 +1000,7 @@ STATIC uint
 xfs_calc_attrsetm_reservation(
        struct xfs_mount        *mp)
 {
-       return XFS_DQUOT_LOGRES(mp) +
+       return XFS_DQUOT_LOGRES +
                xfs_calc_inode_res(mp, 1) +
                xfs_calc_buf_res(1, mp->m_sb.sb_sectsize) +
                xfs_calc_buf_res(XFS_DA_NODE_MAXDEPTH, XFS_FSB_TO_B(mp, 1));
@@ -1040,7 +1040,7 @@ STATIC uint
 xfs_calc_attrrm_reservation(
        struct xfs_mount        *mp)
 {
-       return XFS_DQUOT_LOGRES(mp) +
+       return XFS_DQUOT_LOGRES +
                max((xfs_calc_inode_res(mp, 1) +
                     xfs_calc_buf_res(XFS_DA_NODE_MAXDEPTH,
                                      XFS_FSB_TO_B(mp, 1)) +