afs: Fix manually set volume location server list [Linux 5.0]

afs: Fix manually set volume location server list [Linux 5.0]

This Linux kernel change "afs: Fix manually set volume location server list" is included in the Linux 5.0 release. This change is authored by David Howells <dhowells [at]> on Thu Feb 21 22:04:32 2019 +0000. The commit for this change in Linux stable tree is 7d762d6 (patch).

afs: Fix manually set volume location server list

When a cell with a volume location server list is added manually by
echoing the details into /proc/net/afs/cells, a record is added but the
flag saying it has been looked up isn't set.

This causes the VL server rotation code to wait forever, with the top of
/proc/pid/stack looking like:


with the thread stuck in afs_start_vl_iteration() waiting for
AFS_CELL_FL_NO_LOOKUP_YET to be cleared.

Fix this by clearing AFS_CELL_FL_NO_LOOKUP_YET when setting up a record
if that record's details were supplied manually.

Fixes: 0a5143f2f89c ("afs: Implement VL server rotation")
Reported-by: Dave Botsch <[email protected]>
Signed-off-by: David Howells <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>

There is one line of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 fs/afs/cell.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/afs/cell.c b/fs/afs/cell.c
index cf445db..9de4611 100644
--- a/fs/afs/cell.c
+++ b/fs/afs/cell.c
@@ -173,6 +173,7 @@ static struct afs_cell *afs_alloc_cell(struct afs_net *net,

        rcu_assign_pointer(cell->vl_servers, vllist);
        cell->dns_expiry = TIME64_MAX;
+       __clear_bit(AFS_CELL_FL_NO_LOOKUP_YET, &cell->flags);
    } else {
        cell->dns_expiry = ktime_get_real_seconds();

Leave a Reply

Your email address will not be published. Required fields are marked *