The local format inode holds the data inline in its data fork and has no extents at all, so skip the inode for reflinking. Signed-off-by: Shan Hai <shan.hai@xxxxxxxxxx> --- fs/xfs/xfs_reflink.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fs/xfs/xfs_reflink.c b/fs/xfs/xfs_reflink.c index 592fb2071a03..dfb3a85ec0e6 100644 --- a/fs/xfs/xfs_reflink.c +++ b/fs/xfs/xfs_reflink.c @@ -1507,6 +1507,12 @@ xfs_reflink_inode_has_shared_extents( int error; ifp = XFS_IFORK_PTR(ip, XFS_DATA_FORK); + + if (ifp->if_flags & XFS_IFINLINE) { + *has_shared = false; + return 0; + } + if (!(ifp->if_flags & XFS_IFEXTENTS)) { error = xfs_iread_extents(tp, ip, XFS_DATA_FORK); if (error) -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html