Martin Schwenke has uploaded this change for review.
NLM: Fix NSM reference count double-decrement
Fixes: https://github.com/nfs-ganesha/nfs-ganesha/issues/937
Commit 5febadaa98fb53bc4c3f2dab7793d6afb3847073 moves the NSM
reference count decrement before a possible error is handled.
Commit 275539c02ad3984e17d6d78b494bd9328cf466c7 (authored before the
above, merged after) causes the old sm_unmonitor() function (renamed
to nsm_unmonitor_no_retry()) to be called twice if the first attempt
fails. This means the reference count is likely to be decremented
twice on error.
The commit message for 5febadaa98fb53bc4c3f2dab7793d6afb3847073 says
the reference count decrement needs to be before the call to
nsm_disconnect(). However, it was already before the call to
nsm_disconnect() in the successful case, and it doesn't seem sane to
decrement the reference count on failure. Therefore, partially
reverting 5febadaa98fb53bc4c3f2dab7793d6afb3847073 by moving the
reference count back to where it was.
Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Change-Id: I595e5193f945fe7bcb30cb05d7e2de31f69b7920
---
M src/Protocols/NLM/nsm.c
1 file changed, 30 insertions(+), 1 deletion(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/24/553524/1
To view, visit change 553524. To unsubscribe, or for help writing mail filters, visit settings.