Skip to content

Commit 0f726c1

Browse files
zhangyi089gregkh
authored andcommitted
xfs: make the seq argument to xfs_bmapi_convert_delalloc() optional
commit fc8d0ba upstream. Allow callers to pass a NULLL seq argument if they don't care about the fork sequence number. Signed-off-by: Zhang Yi <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: "Darrick J. Wong" <[email protected]> Signed-off-by: Chandan Babu R <[email protected]> Signed-off-by: Catherine Hoang <[email protected]> Acked-by: Darrick J. Wong <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent f24ba21 commit 0f726c1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

fs/xfs/libxfs/xfs_bmap.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4595,7 +4595,8 @@ xfs_bmapi_convert_delalloc(
45954595
if (!isnullstartblock(bma.got.br_startblock)) {
45964596
xfs_bmbt_to_iomap(ip, iomap, &bma.got, 0, flags,
45974597
xfs_iomap_inode_sequence(ip, flags));
4598-
*seq = READ_ONCE(ifp->if_seq);
4598+
if (seq)
4599+
*seq = READ_ONCE(ifp->if_seq);
45994600
goto out_trans_cancel;
46004601
}
46014602

@@ -4641,7 +4642,8 @@ xfs_bmapi_convert_delalloc(
46414642
ASSERT(!isnullstartblock(bma.got.br_startblock));
46424643
xfs_bmbt_to_iomap(ip, iomap, &bma.got, 0, flags,
46434644
xfs_iomap_inode_sequence(ip, flags));
4644-
*seq = READ_ONCE(ifp->if_seq);
4645+
if (seq)
4646+
*seq = READ_ONCE(ifp->if_seq);
46454647

46464648
if (whichfork == XFS_COW_FORK)
46474649
xfs_refcount_alloc_cow_extent(tp, bma.blkno, bma.length);

0 commit comments

Comments
 (0)