[pnfs] [PATCH 03/11] nfs41: check for null in nfs4_destroy_slot_table
andros at netapp.com
andros at netapp.com
Fri Jul 11 10:39:10 EDT 2008
From: Andy Adamson <andros at netapp.com>
When nfs4_init_session fails, nfs4_put_session will call
nfs4_destroy_slot_table with a null slot pointer
Signed-off-by: Andy Adamson<andros at netapp.com>
---
fs/nfs/nfs4proc.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index b92eaf4..fe486ea 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -4587,9 +4587,8 @@ out_free:
/* Destroy the slot table */
static void nfs4_destroy_slot_table(struct nfs4_channel *channel)
{
- /*
- * XXX: Need to wait for rpcs to complete
- */
+ if (channel->slot_table.slots == NULL)
+ return;
kfree(channel->slot_table.slots);
channel->slot_table.slots = NULL;
if (channel->slot_table.used_slots != &channel->slot_table._used_slots)
--
1.5.4.1
More information about the pNFS
mailing list