diff options
author | Christoph Hellwig <hch@lst.de> | 2020-05-23 10:30:13 +0300 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2020-06-04 06:16:55 +0300 |
commit | cddf8a2c4a8286ae60fc866eab59c8bc524e93a0 (patch) | |
tree | c3f18f1243c85c5f3d67aa2d4f7afc44f3feccb8 /fs/iomap/fiemap.c | |
parent | 2732881894714f545ffac42dad7ba7730069874d (diff) | |
download | linux-cddf8a2c4a8286ae60fc866eab59c8bc524e93a0.tar.xz |
fs: move fiemap range validation into the file systems instances
Replace fiemap_check_flags with a fiemap_prep helper that also takes the
inode and mapped range, and performs the sanity check and truncation
previously done in fiemap_check_range. This way the validation is inside
the file system itself and thus properly works for the stacked overlayfs
case as well.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Link: https://lore.kernel.org/r/20200523073016.2944131-7-hch@lst.de
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/iomap/fiemap.c')
-rw-r--r-- | fs/iomap/fiemap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/iomap/fiemap.c b/fs/iomap/fiemap.c index 449705575acf..89dca4a97e4a 100644 --- a/fs/iomap/fiemap.c +++ b/fs/iomap/fiemap.c @@ -75,7 +75,7 @@ int iomap_fiemap(struct inode *inode, struct fiemap_extent_info *fi, ctx.fi = fi; ctx.prev.type = IOMAP_HOLE; - ret = fiemap_check_flags(fi, FIEMAP_FLAG_SYNC); + ret = fiemap_prep(inode, fi, start, &len, FIEMAP_FLAG_SYNC); if (ret) return ret; |