Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346588
b: refs/heads/master
c: d5fb4ce
h: refs/heads/master
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Dec 5, 2012
1 parent d875920 commit f267ef4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ce008c4bb9766bc7eeb02e8299c8baadc25da90b
refs/heads/master: d5fb4ce33e26e4c1c31c1609b8ffbb24f80bcab8
2 changes: 1 addition & 1 deletion trunk/fs/nfs/callback.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ extern __be32 nfs4_callback_recallany(struct cb_recallanyargs *args,

struct cb_recallslotargs {
struct sockaddr *crsa_addr;
uint32_t crsa_target_max_slots;
uint32_t crsa_target_highest_slotid;
};
extern __be32 nfs4_callback_recallslot(struct cb_recallslotargs *args,
void *dummy,
Expand Down
12 changes: 5 additions & 7 deletions trunk/fs/nfs/callback_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -561,22 +561,20 @@ __be32 nfs4_callback_recallslot(struct cb_recallslotargs *args, void *dummy,
if (!cps->clp) /* set in cb_sequence */
goto out;

dprintk_rcu("NFS: CB_RECALL_SLOT request from %s target max slots %d\n",
dprintk_rcu("NFS: CB_RECALL_SLOT request from %s target highest slotid %d\n",
rpc_peeraddr2str(cps->clp->cl_rpcclient, RPC_DISPLAY_ADDR),
args->crsa_target_max_slots);
args->crsa_target_highest_slotid);

fc_tbl = &cps->clp->cl_session->fc_slot_table;

status = htonl(NFS4ERR_BAD_HIGH_SLOT);
if (args->crsa_target_max_slots > fc_tbl->max_slots ||
args->crsa_target_max_slots < 1)
if (args->crsa_target_highest_slotid >= fc_tbl->max_slots ||
args->crsa_target_highest_slotid < 1)
goto out;

status = htonl(NFS4_OK);
if (args->crsa_target_max_slots == fc_tbl->max_slots)
goto out;

nfs41_set_target_slotid(fc_tbl, args->crsa_target_max_slots);
nfs41_set_target_slotid(fc_tbl, args->crsa_target_highest_slotid);
nfs41_handle_recall_slot(cps->clp);
out:
dprintk("%s: exit with status = %d\n", __func__, ntohl(status));
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/nfs/callback_xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ static __be32 decode_recallslot_args(struct svc_rqst *rqstp,
p = read_buf(xdr, 4);
if (unlikely(p == NULL))
return htonl(NFS4ERR_BADXDR);
args->crsa_target_max_slots = ntohl(*p++);
args->crsa_target_highest_slotid = ntohl(*p++);
return 0;
}

Expand Down

0 comments on commit f267ef4

Please sign in to comment.