]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
librbd/managed_lock/GetLockerRequest: Fix no valid lockers case
authorMatan Breizman <mbreizma@redhat.com>
Mon, 1 May 2023 13:29:29 +0000 (13:29 +0000)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 16 May 2023 20:18:49 +0000 (22:18 +0200)
commit8e676ae5ea5f24b56f86a9f31d58ecb4cee49f05
tree8fd4f59be3d6b3d84031183f640ce1a5236527bb
parente203a000e8abbb0a4272a14b704cd0d359550279
librbd/managed_lock/GetLockerRequest: Fix no valid lockers case

See:
`m_locker->address = iter->second.addr.get_legacy_str();`

In the case where `iter->second.addr` is an empty address,
m_locker->address string is assigned with "0)/0" and therfore
will never result in an empty string.

Use `is_blank_ip()` before `get_legacy_str()`

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit 7482beeea9b1bc8c3cbdac425e7afb8ebdc9f270)
src/librbd/managed_lock/GetLockerRequest.cc