summaryrefslogtreecommitdiffstats
path: root/fs/ext4/file.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2018-05-13 01:55:00 +0200
committerTheodore Ts'o <tytso@mit.edu>2018-05-13 01:55:00 +0200
commit2ee3ee06a8fd792765fa3267ddf928997797eec5 (patch)
tree5840ba188731252ce6ffdec612d59ea709537b86 /fs/ext4/file.c
parentext4: mark block bitmap corrupted when found (diff)
downloadlinux-2ee3ee06a8fd792765fa3267ddf928997797eec5.tar.xz
linux-2ee3ee06a8fd792765fa3267ddf928997797eec5.zip
ext4: fix hole length detection in ext4_ind_map_blocks()
When ext4_ind_map_blocks() computes a length of a hole, it doesn't count with the fact that mapped offset may be somewhere in the middle of the completely empty subtree. In such case it will return too large length of the hole which then results in lseek(SEEK_DATA) to end up returning an incorrect offset beyond the end of the hole. Fix the problem by correctly taking offset within a subtree into account when computing a length of a hole. Fixes: facab4d9711e7aa3532cb82643803e8f1b9518e8 CC: stable@vger.kernel.org Reported-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/file.c')
0 files changed, 0 insertions, 0 deletions