]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - fs/afs/vl_probe.c
Merge tag 'kbuild-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy...
[linux.git] / fs / afs / vl_probe.c
index f402ee8171a1d7cda8b8da05253408003c7f29f7..858498cc1b05224bc52c5879ae559ed2f4fc4072 100644 (file)
@@ -1,12 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* AFS vlserver probing
  *
  * Copyright (C) 2018 Red Hat, Inc. All Rights Reserved.
  * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
  */
 
 #include <linux/sched.h>
@@ -33,8 +29,8 @@ static bool afs_vl_probe_done(struct afs_vlserver *server)
 void afs_vlserver_probe_result(struct afs_call *call)
 {
        struct afs_addr_list *alist = call->alist;
-       struct afs_vlserver *server = call->reply[0];
-       unsigned int server_index = (long)call->reply[1];
+       struct afs_vlserver *server = call->vlserver;
+       unsigned int server_index = call->server_index;
        unsigned int index = call->addr_ix;
        unsigned int rtt = UINT_MAX;
        bool have_result = false;
@@ -141,8 +137,8 @@ static bool afs_do_probe_vlserver(struct afs_net *net,
        struct afs_addr_cursor ac = {
                .index = 0,
        };
+       struct afs_call *call;
        bool in_progress = false;
-       int err;
 
        _enter("%s", server->name);
 
@@ -156,12 +152,14 @@ static bool afs_do_probe_vlserver(struct afs_net *net,
        server->probe.rtt = UINT_MAX;
 
        for (ac.index = 0; ac.index < ac.alist->nr_addrs; ac.index++) {
-               err = afs_vl_get_capabilities(net, &ac, key, server,
-                                             server_index, true);
-               if (err == -EINPROGRESS)
+               call = afs_vl_get_capabilities(net, &ac, key, server,
+                                              server_index);
+               if (!IS_ERR(call)) {
+                       afs_put_call(call);
                        in_progress = true;
-               else
-                       afs_prioritise_error(_e, err, ac.abort_code);
+               } else {
+                       afs_prioritise_error(_e, PTR_ERR(call), ac.abort_code);
+               }
        }
 
        if (!in_progress)