Skip to contentSkip to conversation

lockd: release reference to nsm_handle in nlm_host_rebooted

PATCH In review Jeff Layton 2 participants 3 messages Feb 5, 2010 – Feb 8, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lockd: release reference to nsm_handle in nlm_host_rebooted

nsm_reboot_lookup takes a reference to the nsm_handle that it returns, but nlm_host_rebooted never releases that reference.

---
 fs/lockd/host.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/lockd/host.c +1 -1
index 4600c20..bb464d1 100644
@@ -479,8 +479,8 @@ again:	mutex_lock(&nlm_host_mutex);
 			}
 		}
 	}
-
 	mutex_unlock(&nlm_host_mutex);
+	nsm_release(nsm);
 }
 
 /*
Signature · 1 line
1.6.6
#1 lore raw
Quoted 2 lines · Jeff Layton

nsm_reboot_lookup takes a reference to the nsm_handle that it returns, but nlm_host_rebooted never releases that reference.

Makes sense to me; I'll apply to the nfsd tree.

(How did you run across this?)

--b.

Quoted 24 lines
---
 fs/lockd/host.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/lockd/host.c +1 -1
index 4600c20..bb464d1 100644
@@ -479,8 +479,8 @@ again:	mutex_lock(&nlm_host_mutex);
 			}
 		}
 	}
-
 	mutex_unlock(&nlm_host_mutex);
+	nsm_release(nsm);
 }
 
 /*
Signature · 1 line
1.6.6
#2 lore raw
Quoted 10 lines · On Mon, 8 Feb 2010 16:19:08 -0500 "J. Bruce Fields" <[email protected]>…
Quoted 2 lines · Jeff Layton

nsm_reboot_lookup takes a reference to the nsm_handle that it returns, but nlm_host_rebooted never releases that reference.

Makes sense to me; I'll apply to the nfsd tree.

(How did you run across this?)

--b.

Thanks,

When I was testing Chuck's statd patches, I went through some rather strange scenarios, mostly with Linux as the client. In some cases, we noticed that an SM_UNMON would occur when umounting a NFS filesystem, and in others it wouldn't. These two patches are the result of tracking down the cause. With them in place, a SM_UNMON gets issued much more consistently in the face of server reboots.

Cheers,

Signature · 1 line
Jeff Layton <[email protected]>