diff options
author | David Howells <dhowells@redhat.com> | 2019-05-07 15:30:34 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2019-05-15 17:35:53 +0100 |
commit | ca1cbbdce92bc2bfdc17e4f70ad41f6e6af2d03f (patch) | |
tree | 2229083e8e8186749c7de607d5d53da169270a17 /fs/afs/vl_list.c | |
parent | 6b8812fc8ec28c13c09c89f88ce3958f19238838 (diff) | |
download | lwn-ca1cbbdce92bc2bfdc17e4f70ad41f6e6af2d03f.tar.gz lwn-ca1cbbdce92bc2bfdc17e4f70ad41f6e6af2d03f.zip |
afs: Fix afs_cell records to always have a VL server list record
Fix it such that afs_cell records always have a VL server list record
attached, even if it's a dummy one, so that various checks can be removed.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/vl_list.c')
-rw-r--r-- | fs/afs/vl_list.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/fs/afs/vl_list.c b/fs/afs/vl_list.c index b4f1a84519b9..61e25010ff33 100644 --- a/fs/afs/vl_list.c +++ b/fs/afs/vl_list.c @@ -232,18 +232,16 @@ struct afs_vlserver_list *afs_extract_vlserver_list(struct afs_cell *cell, if (bs.status > NR__dns_lookup_status) bs.status = NR__dns_lookup_status; + /* See if we can update an old server record */ server = NULL; - if (previous) { - /* See if we can update an old server record */ - for (i = 0; i < previous->nr_servers; i++) { - struct afs_vlserver *p = previous->servers[i].server; - - if (p->name_len == bs.name_len && - p->port == bs.port && - strncasecmp(b, p->name, bs.name_len) == 0) { - server = afs_get_vlserver(p); - break; - } + for (i = 0; i < previous->nr_servers; i++) { + struct afs_vlserver *p = previous->servers[i].server; + + if (p->name_len == bs.name_len && + p->port == bs.port && + strncasecmp(b, p->name, bs.name_len) == 0) { + server = afs_get_vlserver(p); + break; } } |