From: Dave Chinner Date: Tue, 16 Aug 2016 22:41:34 +0000 (+1000) Subject: iomap: prepare iomap_fiemap for attribute mappings X-Git-Tag: v4.9-rc1~31^2~93^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ac2dc058bce81b83631ad5accb90b8f4abe613b7;p=platform%2Fkernel%2Flinux-amlogic.git 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 [hch: split from a larger patch] Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner --- diff --git a/fs/iomap.c b/fs/iomap.c index 56c19e6..d9d1f50 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)