Skip to content

Commit

Permalink
NSM: Remove !nsm check from nsm_release()
Browse files Browse the repository at this point in the history
The nsm_release() function should never be called with a NULL handle
point.  If it is, that's a bug.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
  • Loading branch information
Chuck Lever authored and J. Bruce Fields committed Jan 6, 2009
1 parent bc1cc6c commit 05f3a9a
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions fs/lockd/mon.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,6 @@ struct nsm_handle *nsm_find(const struct sockaddr *sap, const size_t salen,
*/
void nsm_release(struct nsm_handle *nsm)
{
if (!nsm)
return;
if (atomic_dec_and_lock(&nsm->sm_count, &nsm_lock)) {
list_del(&nsm->sm_link);
spin_unlock(&nsm_lock);
Expand Down

0 comments on commit 05f3a9a

Please sign in to comment.