[PATCH] xfs: use the SECTOR_SHIFT macro instead of the magic number

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Kaixu Xia <kaixuxia@xxxxxxxxxxx>

We use the SECTOR_SHIFT macro to define the sector size shift, so maybe
it is more reasonable to use it than the magic number 9.

Signed-off-by: Kaixu Xia <kaixuxia@xxxxxxxxxxx>
---
 fs/xfs/xfs_bmap_util.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c
index f2a8a0e75e1f..9f02c1824205 100644
--- a/fs/xfs/xfs_bmap_util.c
+++ b/fs/xfs/xfs_bmap_util.c
@@ -63,8 +63,8 @@ xfs_zero_extent(
 	sector_t		block = XFS_BB_TO_FSBT(mp, sector);
 
 	return blkdev_issue_zeroout(target->bt_bdev,
-		block << (mp->m_super->s_blocksize_bits - 9),
-		count_fsb << (mp->m_super->s_blocksize_bits - 9),
+		block << (mp->m_super->s_blocksize_bits - SECTOR_SHIFT),
+		count_fsb << (mp->m_super->s_blocksize_bits - SECTOR_SHIFT),
 		GFP_NOFS, 0);
 }
 
-- 
2.20.0




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux