mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-18 19:56:07 +07:00
NSM: Remove !nsm check from nsm_release()
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>
This commit is contained in:
parent
bc1cc6c4e4
commit
05f3a9af58
@ -288,8 +288,6 @@ struct nsm_handle *nsm_find(const struct sockaddr *sap, const size_t salen,
|
|||||||
*/
|
*/
|
||||||
void nsm_release(struct nsm_handle *nsm)
|
void nsm_release(struct nsm_handle *nsm)
|
||||||
{
|
{
|
||||||
if (!nsm)
|
|
||||||
return;
|
|
||||||
if (atomic_dec_and_lock(&nsm->sm_count, &nsm_lock)) {
|
if (atomic_dec_and_lock(&nsm->sm_count, &nsm_lock)) {
|
||||||
list_del(&nsm->sm_link);
|
list_del(&nsm->sm_link);
|
||||||
spin_unlock(&nsm_lock);
|
spin_unlock(&nsm_lock);
|
||||||
|
Loading…
Reference in New Issue
Block a user