Skip to content

Commit 7d762d6

Browse files
dhowellstorvalds
authored andcommitted
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: afs_select_vlserver+0x3a6/0x6f3 afs_vl_lookup_vldb+0x4b/0x92 afs_create_volume+0x25/0x1b9 ... 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: 0a5143f ("afs: Implement VL server rotation") Reported-by: Dave Botsch <dwb7@cornell.edu> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 29b00e6 commit 7d762d6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/afs/cell.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ static struct afs_cell *afs_alloc_cell(struct afs_net *net,
173173

174174
rcu_assign_pointer(cell->vl_servers, vllist);
175175
cell->dns_expiry = TIME64_MAX;
176+
__clear_bit(AFS_CELL_FL_NO_LOOKUP_YET, &cell->flags);
176177
} else {
177178
cell->dns_expiry = ktime_get_real_seconds();
178179
}

0 commit comments

Comments
 (0)