diff options
author | Eric Sandeen <sandeen@sandeen.net> | 2017-01-09 10:38:49 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-12 05:39:42 -0500 |
commit | a585e1c4ec939d1cc5ce8776c606733d046072da (patch) | |
tree | fc3a9018566c9aa124da2bb6c19a95b2fa3cb270 /fs | |
parent | bdbfd4ee6bc7aa37062f0222a143b3c3fee7282e (diff) |
xfs: pass state not whichfork to trace_xfs_extlist
commit 7710517fc37b1899722707883b54694ea710b3c0 upstream.
When xfs_bmap_trace_exlist called trace_xfs_extlist,
it sent in the "whichfork" var instead of the bmap "state"
as expected (even though state was already set up for this
purpose).
As a result, the xfs_bmap_class in tracing code used
"whichfork" not state in xfs_iext_state_to_fork(), and got
the wrong ifork pointer. It all goes downhill from
there, including an ASSERT when ifp_bytes is empty
by the time it reaches xfs_iext_get_ext():
XFS: Assertion failed: idx < ifp->if_bytes / sizeof(xfs_bmbt_rec_t)
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/libxfs/xfs_bmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c index aab523a7dcaf..cfd1fdd327eb 100644 --- a/fs/xfs/libxfs/xfs_bmap.c +++ b/fs/xfs/libxfs/xfs_bmap.c | |||
@@ -531,7 +531,7 @@ xfs_bmap_trace_exlist( | |||
531 | ifp = XFS_IFORK_PTR(ip, whichfork); | 531 | ifp = XFS_IFORK_PTR(ip, whichfork); |
532 | ASSERT(cnt == xfs_iext_count(ifp)); | 532 | ASSERT(cnt == xfs_iext_count(ifp)); |
533 | for (idx = 0; idx < cnt; idx++) | 533 | for (idx = 0; idx < cnt; idx++) |
534 | trace_xfs_extlist(ip, idx, whichfork, caller_ip); | 534 | trace_xfs_extlist(ip, idx, state, caller_ip); |
535 | } | 535 | } |
536 | 536 | ||
537 | /* | 537 | /* |