xfs: reflink find shared should take a transaction
Adapt _reflink_find_shared to take an optional transaction pointer. The inode scrubber code will need to decide (within transaction context) if a file has shared blocks. To avoid buffer deadlocks, we must pass the tp through to this function's utility calls. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com>
This commit is contained in:
@@ -455,8 +455,8 @@ xfs_getbmap_adjust_shared(
|
||||
|
||||
agno = XFS_FSB_TO_AGNO(mp, map->br_startblock);
|
||||
agbno = XFS_FSB_TO_AGBNO(mp, map->br_startblock);
|
||||
error = xfs_reflink_find_shared(mp, agno, agbno, map->br_blockcount,
|
||||
&ebno, &elen, true);
|
||||
error = xfs_reflink_find_shared(mp, NULL, agno, agbno,
|
||||
map->br_blockcount, &ebno, &elen, true);
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
|
Reference in New Issue
Block a user