Skip to content

Commit af5d92f

Browse files
jc2870Chandan Babu R
authored andcommitted
xfs: remove unused parameter in macro XFS_DQUOT_LOGRES
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>
1 parent 19ebc8f commit af5d92f

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

fs/xfs/libxfs/xfs_quota_defs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ typedef uint8_t xfs_dqtype_t;
5656
* And, of course, we also need to take into account the dquot log format item
5757
* used to describe each dquot.
5858
*/
59-
#define XFS_DQUOT_LOGRES(mp) \
59+
#define XFS_DQUOT_LOGRES \
6060
((sizeof(struct xfs_dq_logformat) + sizeof(struct xfs_disk_dquot)) * 6)
6161

6262
#define XFS_IS_QUOTA_ON(mp) ((mp)->m_qflags & XFS_ALL_QUOTA_ACCT)

fs/xfs/libxfs/xfs_trans_resv.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -338,11 +338,11 @@ xfs_calc_write_reservation(
338338
blksz);
339339
t1 += adj;
340340
t3 += adj;
341-
return XFS_DQUOT_LOGRES(mp) + max3(t1, t2, t3);
341+
return XFS_DQUOT_LOGRES + max3(t1, t2, t3);
342342
}
343343

344344
t4 = xfs_calc_refcountbt_reservation(mp, 1);
345-
return XFS_DQUOT_LOGRES(mp) + max(t4, max3(t1, t2, t3));
345+
return XFS_DQUOT_LOGRES + max(t4, max3(t1, t2, t3));
346346
}
347347

348348
unsigned int
@@ -410,11 +410,11 @@ xfs_calc_itruncate_reservation(
410410
xfs_refcountbt_block_count(mp, 4),
411411
blksz);
412412

413-
return XFS_DQUOT_LOGRES(mp) + max3(t1, t2, t3);
413+
return XFS_DQUOT_LOGRES + max3(t1, t2, t3);
414414
}
415415

416416
t4 = xfs_calc_refcountbt_reservation(mp, 2);
417-
return XFS_DQUOT_LOGRES(mp) + max(t4, max3(t1, t2, t3));
417+
return XFS_DQUOT_LOGRES + max(t4, max3(t1, t2, t3));
418418
}
419419

420420
unsigned int
@@ -466,7 +466,7 @@ STATIC uint
466466
xfs_calc_rename_reservation(
467467
struct xfs_mount *mp)
468468
{
469-
unsigned int overhead = XFS_DQUOT_LOGRES(mp);
469+
unsigned int overhead = XFS_DQUOT_LOGRES;
470470
struct xfs_trans_resv *resp = M_RES(mp);
471471
unsigned int t1, t2, t3 = 0;
472472

@@ -577,7 +577,7 @@ STATIC uint
577577
xfs_calc_link_reservation(
578578
struct xfs_mount *mp)
579579
{
580-
unsigned int overhead = XFS_DQUOT_LOGRES(mp);
580+
unsigned int overhead = XFS_DQUOT_LOGRES;
581581
struct xfs_trans_resv *resp = M_RES(mp);
582582
unsigned int t1, t2, t3 = 0;
583583

@@ -641,7 +641,7 @@ STATIC uint
641641
xfs_calc_remove_reservation(
642642
struct xfs_mount *mp)
643643
{
644-
unsigned int overhead = XFS_DQUOT_LOGRES(mp);
644+
unsigned int overhead = XFS_DQUOT_LOGRES;
645645
struct xfs_trans_resv *resp = M_RES(mp);
646646
unsigned int t1, t2, t3 = 0;
647647

@@ -729,7 +729,7 @@ xfs_calc_icreate_reservation(
729729
struct xfs_mount *mp)
730730
{
731731
struct xfs_trans_resv *resp = M_RES(mp);
732-
unsigned int overhead = XFS_DQUOT_LOGRES(mp);
732+
unsigned int overhead = XFS_DQUOT_LOGRES;
733733
unsigned int t1, t2, t3 = 0;
734734

735735
t1 = xfs_calc_icreate_resv_alloc(mp);
@@ -747,7 +747,7 @@ STATIC uint
747747
xfs_calc_create_tmpfile_reservation(
748748
struct xfs_mount *mp)
749749
{
750-
uint res = XFS_DQUOT_LOGRES(mp);
750+
uint res = XFS_DQUOT_LOGRES;
751751

752752
res += xfs_calc_icreate_resv_alloc(mp);
753753
return res + xfs_calc_iunlink_add_reservation(mp);
@@ -829,7 +829,7 @@ STATIC uint
829829
xfs_calc_ifree_reservation(
830830
struct xfs_mount *mp)
831831
{
832-
return XFS_DQUOT_LOGRES(mp) +
832+
return XFS_DQUOT_LOGRES +
833833
xfs_calc_inode_res(mp, 1) +
834834
xfs_calc_buf_res(3, mp->m_sb.sb_sectsize) +
835835
xfs_calc_iunlink_remove_reservation(mp) +
@@ -846,7 +846,7 @@ STATIC uint
846846
xfs_calc_ichange_reservation(
847847
struct xfs_mount *mp)
848848
{
849-
return XFS_DQUOT_LOGRES(mp) +
849+
return XFS_DQUOT_LOGRES +
850850
xfs_calc_inode_res(mp, 1) +
851851
xfs_calc_buf_res(1, mp->m_sb.sb_sectsize);
852852

@@ -955,7 +955,7 @@ STATIC uint
955955
xfs_calc_addafork_reservation(
956956
struct xfs_mount *mp)
957957
{
958-
return XFS_DQUOT_LOGRES(mp) +
958+
return XFS_DQUOT_LOGRES +
959959
xfs_calc_inode_res(mp, 1) +
960960
xfs_calc_buf_res(2, mp->m_sb.sb_sectsize) +
961961
xfs_calc_buf_res(1, mp->m_dir_geo->blksize) +
@@ -1003,7 +1003,7 @@ STATIC uint
10031003
xfs_calc_attrsetm_reservation(
10041004
struct xfs_mount *mp)
10051005
{
1006-
return XFS_DQUOT_LOGRES(mp) +
1006+
return XFS_DQUOT_LOGRES +
10071007
xfs_calc_inode_res(mp, 1) +
10081008
xfs_calc_buf_res(1, mp->m_sb.sb_sectsize) +
10091009
xfs_calc_buf_res(XFS_DA_NODE_MAXDEPTH, XFS_FSB_TO_B(mp, 1));
@@ -1043,7 +1043,7 @@ STATIC uint
10431043
xfs_calc_attrrm_reservation(
10441044
struct xfs_mount *mp)
10451045
{
1046-
return XFS_DQUOT_LOGRES(mp) +
1046+
return XFS_DQUOT_LOGRES +
10471047
max((xfs_calc_inode_res(mp, 1) +
10481048
xfs_calc_buf_res(XFS_DA_NODE_MAXDEPTH,
10491049
XFS_FSB_TO_B(mp, 1)) +

0 commit comments

Comments
 (0)