]> git.baikalelectronics.ru Git - kernel.git/commit
lockd: Fix server refcounting
authorTrond Myklebust <trondmy@gmail.com>
Wed, 24 Jan 2018 00:39:04 +0000 (19:39 -0500)
committerTrond Myklebust <trondmy@gmail.com>
Wed, 24 Jan 2018 22:33:57 +0000 (17:33 -0500)
commit70939283d8a7edc13a573dde0ec659b8d1a26461
treedd7ece1d3b2cf6b5475e4e9120d43bced6d46224
parent6cbd08b2726325538f37ea1c8474bcb73b0cb1b6
lockd: Fix server refcounting

The server shouldn't actually delete the struct nlm_host until it hits
the garbage collector. In order to make that work correctly with the
refcount API, we can bump the refcount by one, and then use
refcount_dec_if_one() in the garbage collector.

Signed-off-by: Trond Myklebust <trondmy@gmail.com>
Acked-by: J. Bruce Fields <bfields@fieldses.org>
fs/lockd/host.c