libceph: fix log output race condition in OSD client
authorSimon Buttgereit <simon.buttgereit@tu-ilmenau.de>
Thu, 25 Sep 2025 07:57:26 +0000 (09:57 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 10 Dec 2025 10:50:53 +0000 (11:50 +0100)
commitd6c2f41eb99cdf41f050f5e41405d2ed143ff4ef
tree044e0ed3e7f324c7708b939d589be521a0206d39
parent7d0a66e4bb9081d75c82ec4957c50034cb0ea449
libceph: fix log output race condition in OSD client

OSD client logging has a problem in get_osd() and put_osd().
For one logging output refcount_read() is called twice. If recount
value changes between both calls logging output is not consistent.

This patch prints out only the resulting value.

[ idryomov: don't make the log messages more verbose ]

Signed-off-by: Simon Buttgereit <simon.buttgereit@tu-ilmenau.de>
Reviewed-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
net/ceph/osd_client.c