Skip to content

Commit

Permalink
NFSD: Check status from nfsd4_map_bcts_dir()
Browse files Browse the repository at this point in the history
Compiling gave me this warning:
fs/nfsd/nfs4state.c: In function ‘nfsd4_bind_conn_to_session’:
fs/nfsd/nfs4state.c:1623:9: warning: variable ‘status’ set but not used
[-Wunused-but-set-variable]

The local variable "status" was being set by nfsd4_map_bcts_dir() and
then ignored before calling nfsd4_new_conn().

Signed-off-by: Bryan Schumaker <bjschuma@netapp.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
  • Loading branch information
Bryan Schumaker authored and J. Bruce Fields committed Apr 30, 2011
1 parent fccb13c commit 1db2b9d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -1636,8 +1636,9 @@ __be32 nfsd4_bind_conn_to_session(struct svc_rqst *rqstp,
return nfserr_badsession;

status = nfsd4_map_bcts_dir(&bcts->dir);
nfsd4_new_conn(rqstp, cstate->session, bcts->dir);
return nfs_ok;
if (!status)
nfsd4_new_conn(rqstp, cstate->session, bcts->dir);
return status;
}

static bool nfsd4_compound_in_session(struct nfsd4_session *session, struct nfs4_sessionid *sid)
Expand Down

0 comments on commit 1db2b9d

Please sign in to comment.