From: Christoph Hellwig Date: Wed, 15 Jan 2025 09:46:38 +0000 (+0100) Subject: lockref: improve the lockref_get_not_zero description X-Git-Tag: v6.14-rc1~216^2^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d60f2280a1b5b9a4796f9a13f7fdff1d0b99f718;p=thirdparty%2Fkernel%2Flinux.git lockref: improve the lockref_get_not_zero description lockref_put_return returns exactly -1 and not "an error" when the lockref is dead or locked. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250115094702.504610-3-hch@lst.de Signed-off-by: Christian Brauner --- diff --git a/lib/lockref.c b/lib/lockref.c index a68192c979b32..b1b042a9a6c8e 100644 --- a/lib/lockref.c +++ b/lib/lockref.c @@ -86,7 +86,7 @@ EXPORT_SYMBOL(lockref_get_not_zero); * @lockref: pointer to lockref structure * * Decrement the reference count and return the new value. - * If the lockref was dead or locked, return an error. + * If the lockref was dead or locked, return -1. */ int lockref_put_return(struct lockref *lockref) {