From 0a1e1567b386b96c710d385181330c13ca03ffe3 Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Mon, 6 Nov 2017 11:46:15 -0800 Subject: 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 Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner --- fs/xfs/scrub/attr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/xfs/scrub/attr.c') diff --git a/fs/xfs/scrub/attr.c b/fs/xfs/scrub/attr.c index 5cf30deb8144..4ed80474f545 100644 --- a/fs/xfs/scrub/attr.c +++ b/fs/xfs/scrub/attr.c @@ -98,7 +98,7 @@ xfs_scrub_xattr_listent( if (flags & XFS_ATTR_INCOMPLETE) { /* Incomplete attr key, just mark the inode for preening. */ - xfs_scrub_ino_set_preen(sx->sc, NULL); + xfs_scrub_ino_set_preen(sx->sc, context->dp->i_ino, NULL); return; } -- cgit v1.2.3