Skip to content

Commit 6b35cc8

Browse files
Darrick J. WongChandan Babu R
authored andcommitted
xfs: use XFS_BUF_DADDR_NULL for daddrs in getfsmap code
Use XFS_BUF_DADDR_NULL (instead of a magic sentinel value) to mean "this field is null" like the rest of xfs. Cc: [email protected] Fixes: e89c041 ("xfs: implement the GETFSMAP ioctl") Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]> Signed-off-by: Chandan Babu R <[email protected]>
1 parent 68415b3 commit 6b35cc8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/xfs/xfs_fsmap.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ xfs_getfsmap_rec_before_start(
252252
const struct xfs_rmap_irec *rec,
253253
xfs_daddr_t rec_daddr)
254254
{
255-
if (info->low_daddr != -1ULL)
255+
if (info->low_daddr != XFS_BUF_DADDR_NULL)
256256
return rec_daddr < info->low_daddr;
257257
if (info->low.rm_blockcount)
258258
return xfs_rmap_compare(rec, &info->low) < 0;
@@ -983,7 +983,7 @@ xfs_getfsmap(
983983
info.dev = handlers[i].dev;
984984
info.last = false;
985985
info.pag = NULL;
986-
info.low_daddr = -1ULL;
986+
info.low_daddr = XFS_BUF_DADDR_NULL;
987987
info.low.rm_blockcount = 0;
988988
error = handlers[i].fn(tp, dkeys, &info);
989989
if (error)

0 commit comments

Comments
 (0)