From: Tigran Mkrtchyan Date: Mon, 13 Feb 2012 21:55:28 +0000 (+0100) Subject: nfsd41: save and restore current stateid with current fh X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8307111476bcd6c3e126a06ba9240dfaef83ef63;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git nfsd41: save and restore current stateid with current fh Signed-off-by: Tigran Mkrtchyan Signed-off-by: J. Bruce Fields --- diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index f1dd2702b8fd..32a291af1b4e 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -453,6 +453,7 @@ nfsd4_restorefh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, return nfserr_restorefh; fh_dup2(&cstate->current_fh, &cstate->save_fh); + cstate->current_stateid = cstate->save_stateid; return nfs_ok; } @@ -464,6 +465,7 @@ nfsd4_savefh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, return nfserr_nofilehandle; fh_dup2(&cstate->save_fh, &cstate->current_fh); + cstate->save_stateid = cstate->current_stateid; return nfs_ok; } diff --git a/fs/nfsd/xdr4.h b/fs/nfsd/xdr4.h index b49ffe83e604..3c1ddd7f13a4 100644 --- a/fs/nfsd/xdr4.h +++ b/fs/nfsd/xdr4.h @@ -55,6 +55,7 @@ struct nfsd4_compound_state { u32 minorversion; u32 status; const stateid_t *current_stateid; + const stateid_t *save_stateid; }; static inline bool nfsd4_has_session(struct nfsd4_compound_state *cs)