aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/callback_proc.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2013-01-29 04:48:30 -0500
committerJiri Kosina <jkosina@suse.cz>2013-01-29 04:48:30 -0500
commit617677295b53a40d0e54aac4cbbc216ffbc755dd (patch)
tree51b9e87213243ed5efff252c8e8d8fec4eebc588 /fs/nfs/callback_proc.c
parent5c8d1b68e01a144813e38795fe6dbe7ebb506131 (diff)
parent6abb7c25775b7fb2225ad0508236d63ca710e65f (diff)
Merge branch 'master' into for-next
Conflicts: drivers/devfreq/exynos4_bus.c Sync with Linus' tree to be able to apply patches that are against newer code (mvneta).
Diffstat (limited to 'fs/nfs/callback_proc.c')
-rw-r--r--fs/nfs/callback_proc.c19
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);
582out: 575out:
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;