xfs: make the seq argument to xfs_bmapi_convert_delalloc() optional
BugLink: https://bugs.launchpad.net/bugs/2097575 commit fc8d0ba0ff5fe4700fa02008b7751ec6b84b7677 upstream. Allow callers to pass a NULLL seq argument if they don't care about the fork sequence number. Signed-off-by: Zhang Yi <yi.zhang@huawei.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: "Darrick J. Wong" <djwong@kernel.org> Signed-off-by: Chandan Babu R <chandanbabu@kernel.org> Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com> Acked-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Manuel Diewald <manuel.diewald@canonical.com> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
This commit is contained in:
@@ -4610,7 +4610,8 @@ xfs_bmapi_convert_delalloc(
|
||||
if (!isnullstartblock(bma.got.br_startblock)) {
|
||||
xfs_bmbt_to_iomap(ip, iomap, &bma.got, 0, flags,
|
||||
xfs_iomap_inode_sequence(ip, flags));
|
||||
*seq = READ_ONCE(ifp->if_seq);
|
||||
if (seq)
|
||||
*seq = READ_ONCE(ifp->if_seq);
|
||||
goto out_trans_cancel;
|
||||
}
|
||||
|
||||
@@ -4656,7 +4657,8 @@ xfs_bmapi_convert_delalloc(
|
||||
ASSERT(!isnullstartblock(bma.got.br_startblock));
|
||||
xfs_bmbt_to_iomap(ip, iomap, &bma.got, 0, flags,
|
||||
xfs_iomap_inode_sequence(ip, flags));
|
||||
*seq = READ_ONCE(ifp->if_seq);
|
||||
if (seq)
|
||||
*seq = READ_ONCE(ifp->if_seq);
|
||||
|
||||
if (whichfork == XFS_COW_FORK)
|
||||
xfs_refcount_alloc_cow_extent(tp, bma.blkno, bma.length);
|
||||
|
||||
Reference in New Issue
Block a user