From: Chuck Lever Date: Sat, 6 Dec 2008 00:03:01 +0000 (-0500) Subject: NSM: Remove NULL pointer check from nsm_find() X-Git-Tag: Ubuntu-5.0.0-8.9~29375^2~38 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=bc1cc6c4e476b60df48227165990c87a22db6bb7;p=mirror_ubuntu-disco-kernel.git NSM: Remove NULL pointer check from nsm_find() The nsm_find() function should never be called with a NULL IP address pointer. If it is, that's a bug. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields --- diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c index 38255455563d..0a066a13478e 100644 --- a/fs/lockd/mon.c +++ b/fs/lockd/mon.c @@ -224,9 +224,6 @@ struct nsm_handle *nsm_find(const struct sockaddr *sap, const size_t salen, struct nsm_handle *nsm = NULL; struct nsm_handle *pos; - if (!sap) - return NULL; - if (hostname && memchr(hostname, '/', hostname_len) != NULL) { if (printk_ratelimit()) { printk(KERN_WARNING "Invalid hostname \"%.*s\" "