Skip to content

Commit abb1f08

Browse files
committed
NFSD: Fix crash in nfsd4_read_release()
When tracing is enabled, the trace_nfsd_read_done trace point crashes during the pynfs read.testNoFh test. Fixes: 15a8b55 ("nfsd: call op_release, even when op_func returns an error") Cc: [email protected] Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: Chuck Lever <[email protected]>
1 parent 4f76435 commit abb1f08

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

fs/nfsd/nfs4proc.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -988,10 +988,11 @@ nfsd4_read(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
988988
static void
989989
nfsd4_read_release(union nfsd4_op_u *u)
990990
{
991-
if (u->read.rd_nf)
991+
if (u->read.rd_nf) {
992+
trace_nfsd_read_done(u->read.rd_rqstp, u->read.rd_fhp,
993+
u->read.rd_offset, u->read.rd_length);
992994
nfsd_file_put(u->read.rd_nf);
993-
trace_nfsd_read_done(u->read.rd_rqstp, u->read.rd_fhp,
994-
u->read.rd_offset, u->read.rd_length);
995+
}
995996
}
996997

997998
static __be32

0 commit comments

Comments
 (0)