diff options
| author | Ingo Molnar <mingo@kernel.org> | 2013-01-24 06:47:48 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2013-01-24 06:47:48 -0500 |
| commit | befddb21c845f8fb49e637997891ef97c6a869dc (patch) | |
| tree | 0e7629123184f2dd50291ad6d477b894175f0f26 /fs/nfs/callback_proc.c | |
| parent | e716efde75267eab919cdb2bef5b2cb77f305326 (diff) | |
| parent | 7d1f9aeff1ee4a20b1aeb377dd0f579fe9647619 (diff) | |
Merge tag 'v3.8-rc4' into irq/core
Merge Linux 3.8-rc4 before pulling in new commits - we were on an old v3.7 base.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'fs/nfs/callback_proc.c')
| -rw-r--r-- | fs/nfs/callback_proc.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c index 76b4a7a3e559..264d1aa935f2 100644 --- a/fs/nfs/callback_proc.c +++ b/fs/nfs/callback_proc.c | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #include "delegation.h" | 14 | #include "delegation.h" |
| 15 | #include "internal.h" | 15 | #include "internal.h" |
| 16 | #include "pnfs.h" | 16 | #include "pnfs.h" |
| 17 | #include "nfs4session.h" | ||
| 17 | 18 | ||
| 18 | #ifdef NFS_DEBUG | 19 | #ifdef NFS_DEBUG |
| 19 | #define NFSDBG_FACILITY NFSDBG_CALLBACK | 20 | #define NFSDBG_FACILITY NFSDBG_CALLBACK |
| @@ -205,7 +206,7 @@ static u32 initiate_bulk_draining(struct nfs_client *clp, | |||
| 205 | 206 | ||
| 206 | list_for_each_entry(lo, &server->layouts, plh_layouts) { | 207 | list_for_each_entry(lo, &server->layouts, plh_layouts) { |
| 207 | ino = igrab(lo->plh_inode); | 208 | ino = igrab(lo->plh_inode); |
| 208 | if (ino) | 209 | if (!ino) |
| 209 | continue; | 210 | continue; |
| 210 | spin_lock(&ino->i_lock); | 211 | spin_lock(&ino->i_lock); |
| 211 | /* Is this layout in the process of being freed? */ | 212 | /* Is this layout in the process of being freed? */ |
| @@ -216,7 +217,6 @@ static u32 initiate_bulk_draining(struct nfs_client *clp, | |||
| 216 | } | 217 | } |
| 217 | pnfs_get_layout_hdr(lo); | 218 | pnfs_get_layout_hdr(lo); |
| 218 | spin_unlock(&ino->i_lock); | 219 | spin_unlock(&ino->i_lock); |
| 219 | BUG_ON(!list_empty(&lo->plh_bulk_recall)); | ||
| 220 | list_add(&lo->plh_bulk_recall, &recall_list); | 220 | list_add(&lo->plh_bulk_recall, &recall_list); |
| 221 | } | 221 | } |
| 222 | } | 222 | } |
| @@ -562,23 +562,16 @@ __be32 nfs4_callback_recallslot(struct cb_recallslotargs *args, void *dummy, | |||
| 562 | if (!cps->clp) /* set in cb_sequence */ | 562 | if (!cps->clp) /* set in cb_sequence */ |
| 563 | goto out; | 563 | goto out; |
| 564 | 564 | ||
| 565 | dprintk_rcu("NFS: CB_RECALL_SLOT request from %s target max slots %d\n", | 565 | dprintk_rcu("NFS: CB_RECALL_SLOT request from %s target highest slotid %d\n", |
| 566 | rpc_peeraddr2str(cps->clp->cl_rpcclient, RPC_DISPLAY_ADDR), | 566 | rpc_peeraddr2str(cps->clp->cl_rpcclient, RPC_DISPLAY_ADDR), |
| 567 | args->crsa_target_max_slots); | 567 | args->crsa_target_highest_slotid); |
| 568 | 568 | ||
| 569 | fc_tbl = &cps->clp->cl_session->fc_slot_table; | 569 | fc_tbl = &cps->clp->cl_session->fc_slot_table; |
| 570 | 570 | ||
| 571 | status = htonl(NFS4ERR_BAD_HIGH_SLOT); | ||
| 572 | if (args->crsa_target_max_slots > fc_tbl->max_slots || | ||
| 573 | args->crsa_target_max_slots < 1) | ||
| 574 | goto out; | ||
| 575 | |||
| 576 | status = htonl(NFS4_OK); | 571 | status = htonl(NFS4_OK); |
| 577 | if (args->crsa_target_max_slots == fc_tbl->max_slots) | ||
| 578 | goto out; | ||
| 579 | 572 | ||
| 580 | fc_tbl->target_max_slots = args->crsa_target_max_slots; | 573 | nfs41_set_target_slotid(fc_tbl, args->crsa_target_highest_slotid); |
| 581 | nfs41_handle_recall_slot(cps->clp); | 574 | nfs41_server_notify_target_slotid_update(cps->clp); |
| 582 | out: | 575 | out: |
| 583 | dprintk("%s: exit with status = %d\n", __func__, ntohl(status)); | 576 | dprintk("%s: exit with status = %d\n", __func__, ntohl(status)); |
| 584 | return status; | 577 | return status; |
