summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2017-04-06 16:00:39 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-06-07 12:10:14 +0200
commit8a1f785887d32c1d5206051a78a22529d61248bf (patch)
treee94b2f219cf653d6376797244dcf3bedafce75af
parent1c862f5a3e14e3bfbd7af95636cc19bfa6c44b0d (diff)
downloadlinux-8a1f785887d32c1d5206051a78a22529d61248bf.tar.gz
linux-8a1f785887d32c1d5206051a78a22529d61248bf.tar.bz2
linux-8a1f785887d32c1d5206051a78a22529d61248bf.zip
xfs: actually report xattr extents via iomap
commit 84358536dc355a9c8978ee425f87e116186bed16 upstream. Apparently FIEMAP for xattrs has been broken since we switched to the iomap backend because of an incorrect check for xattr presence. Also fix the broken locking. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--fs/xfs/xfs_iomap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c
index 288ee5b840d7..79e6dfac3dd6 100644
--- a/fs/xfs/xfs_iomap.c
+++ b/fs/xfs/xfs_iomap.c
@@ -1170,10 +1170,10 @@ xfs_xattr_iomap_begin(
if (XFS_FORCED_SHUTDOWN(mp))
return -EIO;
- lockmode = xfs_ilock_data_map_shared(ip);
+ lockmode = xfs_ilock_attr_map_shared(ip);
/* if there are no attribute fork or extents, return ENOENT */
- if (XFS_IFORK_Q(ip) || !ip->i_d.di_anextents) {
+ if (!XFS_IFORK_Q(ip) || !ip->i_d.di_anextents) {
error = -ENOENT;
goto out_unlock;
}