Skip to content

Commit fc8d0ba

Browse files
zhangyi089Chandan Babu R
authored andcommitted
xfs: make the seq argument to xfs_bmapi_convert_delalloc() optional
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]>
1 parent bb71284 commit fc8d0ba

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
@@ -4648,7 +4648,8 @@ xfs_bmapi_convert_delalloc(
46484648
if (!isnullstartblock(bma.got.br_startblock)) {
46494649
xfs_bmbt_to_iomap(ip, iomap, &bma.got, 0, flags,
46504650
xfs_iomap_inode_sequence(ip, flags));
4651-
*seq = READ_ONCE(ifp->if_seq);
4651+
if (seq)
4652+
*seq = READ_ONCE(ifp->if_seq);
46524653
goto out_trans_cancel;
46534654
}
46544655

@@ -4699,7 +4700,8 @@ xfs_bmapi_convert_delalloc(
46994700
ASSERT(!isnullstartblock(bma.got.br_startblock));
47004701
xfs_bmbt_to_iomap(ip, iomap, &bma.got, 0, flags,
47014702
xfs_iomap_inode_sequence(ip, flags));
4702-
*seq = READ_ONCE(ifp->if_seq);
4703+
if (seq)
4704+
*seq = READ_ONCE(ifp->if_seq);
47034705

47044706
if (whichfork == XFS_COW_FORK)
47054707
xfs_refcount_alloc_cow_extent(tp, bma.blkno, bma.length);

0 commit comments

Comments
 (0)