]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
afs: remove variable nr_servers
authorColin Ian King <colin.i.king@gmail.com>
Thu, 20 Oct 2022 17:39:23 +0000 (18:39 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 11:50:56 +0000 (12:50 +0100)
[ Upstream commit 318b83b71242998814a570c3420c042ee6165fca ]

Variable nr_servers is no longer being used, the last reference
to it was removed in commit 45df8462730d ("afs: Fix server list handling")
so clean up the code by removing it.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Link: https://lore.kernel.org/r/20221020173923.21342-1-colin.i.king@gmail.com/
Stable-dep-of: add117e48df4 ("afs: Fix the server_list to unuse a displaced server rather than putting it")
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/afs/volume.c

index 3d39ce5a23f22811e72a6eb0aec5b4ff292526e0..f904ef5ea7141f4d9465d375eba7feca08c76ea3 100644 (file)
@@ -77,11 +77,7 @@ static struct afs_volume *afs_alloc_volume(struct afs_fs_context *params,
 {
        struct afs_server_list *slist;
        struct afs_volume *volume;
-       int ret = -ENOMEM, nr_servers = 0, i;
-
-       for (i = 0; i < vldb->nr_servers; i++)
-               if (vldb->fs_mask[i] & type_mask)
-                       nr_servers++;
+       int ret = -ENOMEM;
 
        volume = kzalloc(sizeof(struct afs_volume), GFP_KERNEL);
        if (!volume)