diff mbox

[22/38] SQUASHME: pnfsd: hanging nfs4_layoutrecall on the client's list must be under the layout_lock

Message ID 1368240232-32576-1-git-send-email-bhalevy@tonian.com (mailing list archive)
State New, archived
Headers show

Commit Message

Benny Halevy May 11, 2013, 2:43 a.m. UTC
Signed-off-by: Benny Halevy <bhalevy@tonian.com>
---
 fs/nfsd/nfs4pnfsd.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/fs/nfsd/nfs4pnfsd.c b/fs/nfsd/nfs4pnfsd.c
index ff688cb..7c454d2 100644
--- a/fs/nfsd/nfs4pnfsd.c
+++ b/fs/nfsd/nfs4pnfsd.c
@@ -1416,8 +1416,10 @@  struct create_recall_list_arg {
 		pending->parent = parent;
 		get_layoutrecall(pending);
 		/* Add to list so corresponding layoutreturn can find req */
+		spin_lock(&layout_lock);
 		list_add(&pending->clr_perclnt,
 			 &pending->clr_client->cl_layoutrecalls);
+		spin_unlock(&layout_lock);
 
 		nfsd4_cb_layout(pending);
 		--todo_len;