]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: fix fiemap size checks for bitmap files
authorChristoph Hellwig <hch@lst.de>
Tue, 5 May 2020 15:43:15 +0000 (17:43 +0200)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 19 May 2020 19:03:37 +0000 (15:03 -0400)
commit9ca366c244a5344d35f9f62b6ca90c88f3ae2a3f
treeca83611f4644651ea3a8e7958a9d95f07a0a3b02
parente4d37dd95ce81c76a6d4bc7cfc00bf78e0d4738e
ext4: fix fiemap size checks for bitmap files

Add an extra validation of the len parameter, as for ext4 some files
might have smaller file size limits than others.  This also means the
redundant size check in ext4_ioctl_get_es_cache can go away, as all
size checking is done in the shared fiemap handler.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ritesh Harjani <riteshh@linux.ibm.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20200505154324.3226743-3-hch@lst.de
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/extents.c
fs/ext4/ioctl.c