diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index d0848fc6529edba95baf30d120be4d80a19cb9d9..4a8314f08a0e01e285fb543386db42b804aa6a73 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -1071,6 +1071,8 @@ nfsd4_seek(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, dprintk("NFSD: nfsd4_seek: couldn't process stateid!\n"); return status; } + if (!file) + return nfserr_bad_stateid; switch (seek->seek_whence) { case NFS4_CONTENT_DATA: