]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: pass inode number to xfs_scrub_ino_set_{preen,warning}
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 6 Nov 2017 19:46:15 +0000 (11:46 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 9 Nov 2017 17:10:45 +0000 (09:10 -0800)
commit6c4cf75610a9e64f3f160d87c23545905a31eb97
tree957b4f93ef93372b595f48f45a7b5c22f144fbe9
parent8cecee1f5b4b3325f515e28bde5bc2b43ce9501a
xfs: pass inode number to xfs_scrub_ino_set_{preen,warning}

There are two ways to scrub an inode -- calling xfs_iget and checking
the raw inode core, or by loading the inode cluster buffer and checking
the on-disk contents directly.  The second method is only useful if
_iget fails the verifiers; when this is the case, sc->ip is NULL and
calling the tracepoint will cause a system crash.

Therefore, pass the raw inode number directly into the _preen and
_warning functions.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/scrub/attr.c
fs/xfs/scrub/common.c
fs/xfs/scrub/common.h
fs/xfs/scrub/inode.c