Return-Path: linux-nfs-owner@vger.kernel.org Received: from mail-bk0-f46.google.com ([209.85.214.46]:50458 "EHLO mail-bk0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933012Ab2AFJmx (ORCPT ); Fri, 6 Jan 2012 04:42:53 -0500 Received: by mail-bk0-f46.google.com with SMTP id jm19so273092bkc.19 for ; Fri, 06 Jan 2012 01:42:52 -0800 (PST) From: Tigran Mkrtchyan To: linux-nfs@vger.kernel.org Cc: Tigran Mkrtchyan Subject: [PATH v5 6/8] nfsd41: save and restore current stateid with current fh Date: Fri, 6 Jan 2012 10:45:14 +0100 Message-Id: <1325843116-20570-7-git-send-email-tigran.mkrtchyan@desy.de> In-Reply-To: <1325843116-20570-1-git-send-email-tigran.mkrtchyan@desy.de> References: <1325843116-20570-1-git-send-email-tigran.mkrtchyan@desy.de> Sender: linux-nfs-owner@vger.kernel.org List-ID: From: Tigran Mkrtchyan Signed-off-by: Tigran Mkrtchyan --- fs/nfsd/nfs4proc.c | 2 ++ fs/nfsd/xdr4.h | 1 + 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index 76b96a2..4b32672 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -454,6 +454,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; } @@ -465,6 +466,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 7ec4e4f..a86d24d8 100644 --- a/fs/nfsd/xdr4.h +++ b/fs/nfsd/xdr4.h @@ -57,6 +57,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) -- 1.7.7.5