[RFC 15/51] FIXME: nfsd41: free up slot unless operation is dropped

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Marc Eshel <eshel@xxxxxxxxxxxxxxx>

Mark slot is NFS4_SLOT_AVAILABLE before exiting nfsd4_proc_compound
unless op->status == nfserr_dropit

FIXME: bhalevy: verify slot gets freed eventually in the dropit case.

Signed-off-by: Benny Halevy <bhalevy@xxxxxxxxxxx>
---
 fs/nfsd/nfs4proc.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index bfebeaa..876f285 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -979,8 +979,15 @@ out_free:
 #if defined(CONFIG_NFSD_V4_1)
 	if (current_ses) {
 		struct nfs41_slot *cs_slot = current_ses->cs_slot;
-		if (cs_slot)
+		if (cs_slot) {
+			if (op && op->status != nfserr_dropit) {
+				dprintk("%s: SET SLOT STATE TO AVAILABLE\n",
+					__func__);
+				nfs41_set_slot_state(cs_slot,
+						     NFS4_SLOT_AVAILABLE);
+			}
 			nfs41_put_session(cs_slot->sl_session);
+		}
 		kfree(current_ses);
 	}
 #endif /* CONFIG_NFSD_V4_1 */
-- 
1.6.0.2

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux