Merge tag '9p-for-5.11-rc1' of git://github.com/martinetd/linux
[linux-2.6-microblaze.git] / drivers / block / rbd.c
index 2ed79b0..59cfe71 100644 (file)
@@ -3925,8 +3925,12 @@ static int find_watcher(struct rbd_device *rbd_dev,
 
        sscanf(locker->id.cookie, RBD_LOCK_COOKIE_PREFIX " %llu", &cookie);
        for (i = 0; i < num_watchers; i++) {
-               if (!memcmp(&watchers[i].addr, &locker->info.addr,
-                           sizeof(locker->info.addr)) &&
+               /*
+                * Ignore addr->type while comparing.  This mimics
+                * entity_addr_t::get_legacy_str() + strcmp().
+                */
+               if (ceph_addr_equal_no_type(&watchers[i].addr,
+                                           &locker->info.addr) &&
                    watchers[i].cookie == cookie) {
                        struct rbd_client_id cid = {
                                .gid = le64_to_cpu(watchers[i].name.num),