NFS4.1: Fix bug server don't reply the right fore_channel to client at create_session
authorMi Jinlong <mijinlong@cn.fujitsu.com>
Thu, 11 Nov 2010 10:03:40 +0000 (18:03 +0800)
committerJ. Bruce Fields <bfields@redhat.com>
Fri, 19 Nov 2010 23:35:12 +0000 (18:35 -0500)
At the latest kernel(2.6.37-rc1), server just initialize the forechannel
at init_forechannel_attrs, but don't reflect it to reply.

After initialize the session success, we should copy the forechannel info
to nfsd4_create_session struct.

Reviewed-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: Mi Jinlong <mijinlong@cn.fujitsu.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4state.c

index 5d0ee0f0cb0e17870c18c62687d58ffbc4151225..afa7525a86bedec62739d8a48c6a595ac4884050 100644 (file)
@@ -1562,6 +1562,8 @@ nfsd4_create_session(struct svc_rqst *rqstp,
        status = nfs_ok;
        memcpy(cr_ses->sessionid.data, new->se_sessionid.data,
               NFS4_MAX_SESSIONID_LEN);
+       memcpy(&cr_ses->fore_channel, &new->se_fchannel,
+               sizeof(struct nfsd4_channel_attrs));
        cs_slot->sl_seqid++;
        cr_ses->seqid = cs_slot->sl_seqid;