summaryrefslogtreecommitdiffstats
path: root/fs/iomap.c
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2016-08-17 00:41:34 +0200
committerDave Chinner <david@fromorbit.com>2016-08-17 00:41:34 +0200
commitac2dc058bce81b83631ad5accb90b8f4abe613b7 (patch)
tree320bccdcdfcd25f8b878172b97ed92310c1d3f3b /fs/iomap.c
parentiomap: fiemap should honor the FIEMAP_FLAG_SYNC flag (diff)
downloadlinux-ac2dc058bce81b83631ad5accb90b8f4abe613b7.tar.xz
linux-ac2dc058bce81b83631ad5accb90b8f4abe613b7.zip
iomap: prepare iomap_fiemap for attribute mappings
By bassing through an -ENOENT, similar to the old XFS implementation of FIEMAP_FLAG_XATTR. Signed-off-by: Dave Chinner <dchinner@redhat.com> [hch: split from a larger patch] Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/iomap.c')
-rw-r--r--fs/iomap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/iomap.c b/fs/iomap.c
index 56c19e617a26..d9d1f50c36aa 100644
--- a/fs/iomap.c
+++ b/fs/iomap.c
@@ -476,6 +476,9 @@ int iomap_fiemap(struct inode *inode, struct fiemap_extent_info *fi,
while (len > 0) {
ret = iomap_apply(inode, start, len, 0, ops, &ctx,
iomap_fiemap_actor);
+ /* inode with no (attribute) mapping will give ENOENT */
+ if (ret == -ENOENT)
+ break;
if (ret < 0)
return ret;
if (ret == 0)