mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 15:27:29 +00:00
xfs: introduce a new xfs_inode_has_cow_data helper
We have a few places that already check if an inode has actual data in the COW fork to avoid work on reflink inodes that do not actually have outstanding COW blocks. There are a few more places that can avoid working if doing the same check, so add a documented helper for this condition and use it in all places where it makes sense. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
This commit is contained in:
parent
3ba738df25
commit
51d6269030
6 changed files with 18 additions and 12 deletions
|
@ -478,7 +478,7 @@ xfs_reflink_cancel_cow_blocks(
|
|||
struct xfs_iext_cursor icur;
|
||||
int error = 0;
|
||||
|
||||
if (!xfs_is_reflink_inode(ip))
|
||||
if (!xfs_inode_has_cow_data(ip))
|
||||
return 0;
|
||||
if (!xfs_iext_lookup_extent_before(ip, ifp, &end_fsb, &icur, &got))
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue