diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-11-20 15:16:30 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-12-05 18:30:37 -0500 |
commit | ce008c4bb9766bc7eeb02e8299c8baadc25da90b (patch) | |
tree | b628ebf967388d2b7c76592dfde451516def7b36 /fs/nfs/nfs4proc.c | |
parent | da0507b7c95ccd4d9c86394eef42fe076032af30 (diff) |
NFSv4.1: Fix nfs4_callback_recallslot to work with dynamic slot allocation
Ensure that the NFSv4.1 CB_RECALL_SLOT callback updates the slot table
target max slotid safely.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r-- | fs/nfs/nfs4proc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 52435ec44193..62212231ce62 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -498,6 +498,14 @@ static void nfs41_set_target_slotid_locked(struct nfs4_slot_table *tbl, | |||
498 | tbl->generation++; | 498 | tbl->generation++; |
499 | } | 499 | } |
500 | 500 | ||
501 | void nfs41_set_target_slotid(struct nfs4_slot_table *tbl, | ||
502 | u32 target_highest_slotid) | ||
503 | { | ||
504 | spin_lock(&tbl->slot_tbl_lock); | ||
505 | nfs41_set_target_slotid_locked(tbl, target_highest_slotid); | ||
506 | spin_unlock(&tbl->slot_tbl_lock); | ||
507 | } | ||
508 | |||
501 | static void nfs41_set_server_slotid_locked(struct nfs4_slot_table *tbl, | 509 | static void nfs41_set_server_slotid_locked(struct nfs4_slot_table *tbl, |
502 | u32 highest_slotid) | 510 | u32 highest_slotid) |
503 | { | 511 | { |