callback_proc.c (6bc19fb82d4c05a9eee19d6d2aab2ce26e499ec2) callback_proc.c (459de2edb9105a5d091f8215650e12c0812d59f3)
1/*
2 * linux/fs/nfs/callback_proc.c
3 *
4 * Copyright (C) 2004 Trond Myklebust
5 *
6 * NFSv4 callback procedures
7 */
8#include <linux/nfs4.h>

--- 392 unchanged lines hidden (view full) ---

401 struct cb_sequenceres *res,
402 struct cb_process_state *cps)
403{
404 struct nfs4_slot_table *tbl;
405 struct nfs_client *clp;
406 int i;
407 __be32 status = htonl(NFS4ERR_BADSESSION);
408
1/*
2 * linux/fs/nfs/callback_proc.c
3 *
4 * Copyright (C) 2004 Trond Myklebust
5 *
6 * NFSv4 callback procedures
7 */
8#include <linux/nfs4.h>

--- 392 unchanged lines hidden (view full) ---

401 struct cb_sequenceres *res,
402 struct cb_process_state *cps)
403{
404 struct nfs4_slot_table *tbl;
405 struct nfs_client *clp;
406 int i;
407 __be32 status = htonl(NFS4ERR_BADSESSION);
408
409 clp = nfs4_find_client_sessionid(cps->net, args->csa_addr, &args->csa_sessionid);
409 clp = nfs4_find_client_sessionid(cps->net, args->csa_addr,
410 &args->csa_sessionid, cps->minorversion);
410 if (clp == NULL)
411 goto out;
412
413 tbl = &clp->cl_session->bc_slot_table;
414
415 spin_lock(&tbl->slot_tbl_lock);
416 /* state manager is resetting the session */
411 if (clp == NULL)
412 goto out;
413
414 tbl = &clp->cl_session->bc_slot_table;
415
416 spin_lock(&tbl->slot_tbl_lock);
417 /* state manager is resetting the session */
417 if (test_bit(NFS4_SLOT_TBL_DRAINING, &tbl->slot_tbl_state)) {
418 if (test_bit(NFS4_SESSION_DRAINING, &clp->cl_session->session_state)) {
418 spin_unlock(&tbl->slot_tbl_lock);
419 status = htonl(NFS4ERR_DELAY);
420 /* Return NFS4ERR_BADSESSION if we're draining the session
421 * in order to reset it.
422 */
423 if (test_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state))
424 status = htonl(NFS4ERR_BADSESSION);
425 goto out;

--- 109 unchanged lines hidden ---
419 spin_unlock(&tbl->slot_tbl_lock);
420 status = htonl(NFS4ERR_DELAY);
421 /* Return NFS4ERR_BADSESSION if we're draining the session
422 * in order to reset it.
423 */
424 if (test_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state))
425 status = htonl(NFS4ERR_BADSESSION);
426 goto out;

--- 109 unchanged lines hidden ---