mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 05:44:11 +00:00
NFSD: Fix trace_nfsd_fh_verify_err() crasher
[ Upstream commit5a01c80544
] Now that the nfsd_fh_verify_err() tracepoint is always called on error, it needs to handle cases where the filehandle is not yet fully formed. Fixes:93c128e709
("nfsd: ensure we always call fh_verify_error tracepoint") Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
This commit is contained in:
parent
3f439c7701
commit
e4d7874308
1 changed files with 4 additions and 1 deletions
|
@ -254,7 +254,10 @@ TRACE_EVENT_CONDITION(nfsd_fh_verify_err,
|
||||||
rqstp->rq_xprt->xpt_remotelen);
|
rqstp->rq_xprt->xpt_remotelen);
|
||||||
__entry->xid = be32_to_cpu(rqstp->rq_xid);
|
__entry->xid = be32_to_cpu(rqstp->rq_xid);
|
||||||
__entry->fh_hash = knfsd_fh_hash(&fhp->fh_handle);
|
__entry->fh_hash = knfsd_fh_hash(&fhp->fh_handle);
|
||||||
__entry->inode = d_inode(fhp->fh_dentry);
|
if (fhp->fh_dentry)
|
||||||
|
__entry->inode = d_inode(fhp->fh_dentry);
|
||||||
|
else
|
||||||
|
__entry->inode = NULL;
|
||||||
__entry->type = type;
|
__entry->type = type;
|
||||||
__entry->access = access;
|
__entry->access = access;
|
||||||
__entry->error = be32_to_cpu(error);
|
__entry->error = be32_to_cpu(error);
|
||||||
|
|
Loading…
Reference in a new issue