Commit 9afb9784 authored by J. Bruce Fields's avatar J. Bruce Fields

nfsd4: simplify lock openmode check

Note that the special handling for the lock stateid case is already done
by nfs4_check_openmode() (as of 02921914
"nfsd4: fix openmode checking on IO using lock stateid") so we no longer
need these two cases in the caller.
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent a9004abc
...@@ -3453,16 +3453,11 @@ nfs4_preprocess_seqid_op(struct nfsd4_compound_state *cstate, u32 seqid, ...@@ -3453,16 +3453,11 @@ nfs4_preprocess_seqid_op(struct nfsd4_compound_state *cstate, u32 seqid,
if (!nfsd4_has_session(cstate) && if (!nfsd4_has_session(cstate) &&
!same_clid(&clp->cl_clientid, lockclid)) !same_clid(&clp->cl_clientid, lockclid))
return nfserr_bad_stateid; return nfserr_bad_stateid;
/* stp is the open stateid */ }
status = nfs4_check_openmode(stp, lkflg); /* stp is the open stateid */
if (status) status = nfs4_check_openmode(stp, lkflg);
return status; if (status)
} else { return status;
/* stp is the lock stateid */
status = nfs4_check_openmode(stp->st_openstp, lkflg);
if (status)
return status;
}
} }
if (nfs4_check_fh(current_fh, stp)) { if (nfs4_check_fh(current_fh, stp)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment