commit | 44628a06209a0f1cfc80bca67111648399954806 | [log] [tgz] |
---|---|---|
author | Alex Vainman <alexonlists@gmail.com> | Mon Feb 01 07:58:00 2010 +0200 |
committer | Roland Dreier <rolandd@cisco.com> | Fri Mar 19 11:04:10 2010 -0700 |
tree | f271e1774f173aa72b283e31cfbb404d2d87d6b8 | |
parent | c2fa381cf71148f01b4958f3e46650f55effa763 [diff] |
Increment node refcount in ibv_madvise_range() only if madvise() succeeds ibv_madvise_range() first updates the memory range reference count and then calls to madvise(). If madvise() fails, the reference count of the failed node is incorrect. Fix this by updating the node's reference count only after a successful call to madvise() (or if no call to madvise() was needed). Signed-off-by: Alex Vainman <alexv@voltaire.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>