mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
[PATCH] knfsd: call lockd_down when closing a socket via a write to nfsd/portlist
The refcount that nfsd holds on lockd is based on the number of open sockets. So when we close a socket, we should decrement the ref (with lockd_down). Currently when a socket is closed via writing to the portlist file, that doesn't happen. So: make sure we get an error return if the socket that was requested does is not found, and call lockd_down if it was. Cc: "J. Bruce Fields" <[email protected]> Signed-off-by: Neil Brown <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
7ed94296a6
commit
37a034729a
2 changed files with 4 additions and 0 deletions
|
|
@ -493,6 +493,8 @@ svc_sock_names(char *buf, struct svc_serv *serv, char *toclose)
|
|||
spin_unlock(&serv->sv_lock);
|
||||
if (closesk)
|
||||
svc_delete_socket(closesk);
|
||||
else if (toclose)
|
||||
return -ENOENT;
|
||||
return len;
|
||||
}
|
||||
EXPORT_SYMBOL(svc_sock_names);
|
||||
|
|
|
|||
Loading…
Reference in a new issue