linux-stable/fs/gfs2
Andreas Gruenbacher 21344f0575 gfs2: gfs2_walk_metadata fix
commit a27a0c9b6a upstream.

It turns out that the current version of gfs2_metadata_walker suffers
from multiple problems that can cause gfs2_hole_size to report an
incorrect size.  This will confuse fiemap as well as lseek with the
SEEK_DATA flag.

Fix that by changing gfs2_hole_walker to compute the metapath to the
first data block after the hole (if any), and compute the hole size
based on that.

Fixes xfstest generic/490.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: Bob Peterson <rpeterso@redhat.com>
Cc: stable@vger.kernel.org # v4.18+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-16 10:12:41 +02:00
..
acl.c gfs2: using posix_acl_xattr_size instead of posix_acl_to_xattr 2018-07-24 20:02:11 +02:00
acl.h
aops.c gfs2: use iomap_readpage for blocksize == PAGE_SIZE 2018-07-25 00:08:49 +02:00
aops.h gfs2: iomap buffered write support 2018-07-02 16:27:17 +01:00
bmap.c gfs2: gfs2_walk_metadata fix 2019-08-16 10:12:41 +02:00
bmap.h gfs2: Iomap cleanups and improvements 2018-06-04 07:56:51 -05:00
dentry.c gfs2: Lock holder cleanup 2016-06-27 09:47:09 -05:00
dir.c gfs2: remove redundant variable 'moved' 2018-07-25 00:08:59 +02:00
dir.h
export.c gfs2: Get rid of gfs2_ilookup 2016-06-27 09:47:08 -05:00
file.c gfs2: Use iomap for stuffed direct I/O reads 2018-07-25 00:08:40 +02:00
gfs2.h
glock.c gfs2: Fix occasional glock use-after-free 2019-05-31 06:46:07 -07:00
glock.h gfs2: gfs2_evict_inode: Put glocks asynchronously 2017-08-10 10:45:21 -05:00
glops.c vfs: change inode times to use struct timespec64 2018-06-05 16:57:31 -07:00
glops.h
incore.h gfs2: Fix gfs2_testbit to use clone bitmaps 2018-08-07 10:07:00 -05:00
inode.c gfs2: Get rid of potential double-freeing in gfs2_create_inode 2019-01-13 09:51:07 +01:00
inode.h gfs2: Implement SEEK_HOLE / SEEK_DATA via iomap 2017-10-31 14:26:35 +01:00
Kconfig gfs2: Fix the crc32c dependency 2018-02-01 11:25:31 -07:00
lock_dlm.c gfs2: Fix sign extension bug in gfs2_update_stats 2019-05-31 06:46:02 -07:00
log.c gfs2: Fix occasional glock use-after-free 2019-05-31 06:46:07 -07:00
log.h gfs2: Remove ordered write mode handling from gfs2_trans_add_data 2018-06-04 07:50:16 -05:00
lops.c gfs2: Fix occasional glock use-after-free 2019-05-31 06:46:07 -07:00
lops.h GFS2: Introduce new gfs2_log_header_v2 2018-01-23 07:38:53 -07:00
main.c gfs2: Fix wrong error handling in init_gfs2_fs() 2017-11-27 10:47:22 -06:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
meta_io.c gfs2: Don't withdraw under a spin lock 2018-06-21 07:39:44 -05:00
meta_io.h
ops_fstype.c gfs2: Don't leave s_fs_info pointing to freed memory in init_sbd 2018-12-01 09:37:27 +01:00
quota.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
quota.h gfs2: Fix fallocate chunk size 2018-03-08 09:26:20 -07:00
recovery.c GFS2: Fix recovery issues for spectators 2018-07-25 00:06:24 +02:00
recovery.h GFS2: Fix gfs2_replay_incr_blk for multiple journal sizes 2016-07-21 13:02:44 -05:00
rgrp.c gfs2: Revert "Fix loop in gfs2_rbm_find" 2019-02-06 17:30:13 +01:00
rgrp.h GFS2: Non-recursive delete 2017-04-19 08:25:43 -04:00
super.c Merge branch 'iomap-write' into linux-gfs2/for-next 2018-07-24 20:02:40 +02:00
super.h
sys.c GFS2: Fix recovery issues for spectators 2018-07-25 00:06:24 +02:00
sys.h
trace_gfs2.h gfs2: eliminate rs_inum and reduce the size of gfs2 inodes 2018-06-21 07:39:31 -05:00
trans.c gfs2: Remove ordered write mode handling from gfs2_trans_add_data 2018-06-04 07:50:16 -05:00
trans.h gfs2: Eliminate redundant ip->i_rgd 2018-07-05 17:47:16 +02:00
util.c gfs2: Don't withdraw under a spin lock 2018-06-21 07:39:44 -05:00
util.h gfs2: Don't withdraw under a spin lock 2018-06-21 07:39:44 -05:00
xattr.c gfs2: Get rid of gfs2_ea_strlen 2018-08-03 13:20:02 +01:00
xattr.h