Patch "xfs: use XFS_BUF_DADDR_NULL for daddrs in getfsmap code" has been added to the 6.6-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    xfs: use XFS_BUF_DADDR_NULL for daddrs in getfsmap code

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     xfs-use-xfs_buf_daddr_null-for-daddrs-in-getfsmap-co.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 666b02201ba47e84caef64d2e2396e96846c9c2f
Author: Darrick J. Wong <djwong@xxxxxxxxxx>
Date:   Wed Dec 18 11:17:23 2024 -0800

    xfs: use XFS_BUF_DADDR_NULL for daddrs in getfsmap code
    
    commit 6b35cc8d9239569700cc7cc737c8ed40b8b9cfdb upstream.
    
    Use XFS_BUF_DADDR_NULL (instead of a magic sentinel value) to mean "this
    field is null" like the rest of xfs.
    
    Cc: wozizhi@xxxxxxxxxx
    Fixes: e89c041338ed6 ("xfs: implement the GETFSMAP ioctl")
    Reviewed-by: Christoph Hellwig <hch@xxxxxx>
    Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx>
    Signed-off-by: Chandan Babu R <chandanbabu@xxxxxxxxxx>
    Signed-off-by: Catherine Hoang <catherine.hoang@xxxxxxxxxx>
    Acked-by: Darrick J. Wong <djwong@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/xfs/xfs_fsmap.c b/fs/xfs/xfs_fsmap.c
index 85953dbd4283..7754d51e1c27 100644
--- a/fs/xfs/xfs_fsmap.c
+++ b/fs/xfs/xfs_fsmap.c
@@ -252,7 +252,7 @@ xfs_getfsmap_rec_before_start(
 	const struct xfs_rmap_irec	*rec,
 	xfs_daddr_t			rec_daddr)
 {
-	if (info->low_daddr != -1ULL)
+	if (info->low_daddr != XFS_BUF_DADDR_NULL)
 		return rec_daddr < info->low_daddr;
 	if (info->low.rm_blockcount)
 		return xfs_rmap_compare(rec, &info->low) < 0;
@@ -986,7 +986,7 @@ xfs_getfsmap(
 		info.dev = handlers[i].dev;
 		info.last = false;
 		info.pag = NULL;
-		info.low_daddr = -1ULL;
+		info.low_daddr = XFS_BUF_DADDR_NULL;
 		info.low.rm_blockcount = 0;
 		error = handlers[i].fn(tp, dkeys, &info);
 		if (error)




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux