Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
David Howells | 08e0e7c | 2007-04-26 15:55:03 -0700 | [diff] [blame] | 2 | * Copyright (c) 2002, 2007 Red Hat, Inc. All rights reserved. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3 | * |
| 4 | * This software may be freely redistributed under the terms of the |
| 5 | * GNU General Public License. |
| 6 | * |
| 7 | * You should have received a copy of the GNU General Public License |
| 8 | * along with this program; if not, write to the Free Software |
| 9 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 10 | * |
David Woodhouse | 44d1b98 | 2008-06-05 22:46:18 -0700 | [diff] [blame] | 11 | * Authors: David Woodhouse <dwmw2@infradead.org> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 12 | * David Howells <dhowells@redhat.com> |
| 13 | * |
| 14 | */ |
| 15 | |
| 16 | #include <linux/kernel.h> |
| 17 | #include <linux/module.h> |
| 18 | #include <linux/init.h> |
David Howells | 08e0e7c | 2007-04-26 15:55:03 -0700 | [diff] [blame] | 19 | #include <linux/circ_buf.h> |
Alexey Dobriyan | e8edc6e | 2007-05-21 01:22:52 +0400 | [diff] [blame] | 20 | #include <linux/sched.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | #include "internal.h" |
David Howells | 08e0e7c | 2007-04-26 15:55:03 -0700 | [diff] [blame] | 22 | |
David Howells | c435ee3 | 2017-11-02 15:27:49 +0000 | [diff] [blame] | 23 | /* |
David Howells | 47ea0f2 | 2018-06-15 15:24:50 +0100 | [diff] [blame^] | 24 | * Create volume and callback interests on a server. |
| 25 | */ |
| 26 | static struct afs_cb_interest *afs_create_interest(struct afs_server *server, |
| 27 | struct afs_vnode *vnode) |
| 28 | { |
| 29 | struct afs_vol_interest *new_vi, *vi; |
| 30 | struct afs_cb_interest *new; |
| 31 | struct hlist_node **pp; |
| 32 | |
| 33 | new_vi = kzalloc(sizeof(struct afs_vol_interest), GFP_KERNEL); |
| 34 | if (!new_vi) |
| 35 | return NULL; |
| 36 | |
| 37 | new = kzalloc(sizeof(struct afs_cb_interest), GFP_KERNEL); |
| 38 | if (!new) { |
| 39 | kfree(new_vi); |
| 40 | return NULL; |
| 41 | } |
| 42 | |
| 43 | new_vi->usage = 1; |
| 44 | new_vi->vid = vnode->volume->vid; |
| 45 | INIT_HLIST_NODE(&new_vi->srv_link); |
| 46 | INIT_HLIST_HEAD(&new_vi->cb_interests); |
| 47 | |
| 48 | refcount_set(&new->usage, 1); |
| 49 | new->sb = vnode->vfs_inode.i_sb; |
| 50 | new->vid = vnode->volume->vid; |
| 51 | new->server = afs_get_server(server); |
| 52 | INIT_HLIST_NODE(&new->cb_vlink); |
| 53 | |
| 54 | write_lock(&server->cb_break_lock); |
| 55 | |
| 56 | for (pp = &server->cb_volumes.first; *pp; pp = &(*pp)->next) { |
| 57 | vi = hlist_entry(*pp, struct afs_vol_interest, srv_link); |
| 58 | if (vi->vid < new_vi->vid) |
| 59 | continue; |
| 60 | if (vi->vid > new_vi->vid) |
| 61 | break; |
| 62 | vi->usage++; |
| 63 | goto found_vi; |
| 64 | } |
| 65 | |
| 66 | new_vi->srv_link.pprev = pp; |
| 67 | new_vi->srv_link.next = *pp; |
| 68 | if (*pp) |
| 69 | (*pp)->pprev = &new_vi->srv_link.next; |
| 70 | *pp = &new_vi->srv_link; |
| 71 | vi = new_vi; |
| 72 | new_vi = NULL; |
| 73 | found_vi: |
| 74 | |
| 75 | new->vol_interest = vi; |
| 76 | hlist_add_head(&new->cb_vlink, &vi->cb_interests); |
| 77 | |
| 78 | write_unlock(&server->cb_break_lock); |
| 79 | kfree(new_vi); |
| 80 | return new; |
| 81 | } |
| 82 | |
| 83 | /* |
David Howells | c435ee3 | 2017-11-02 15:27:49 +0000 | [diff] [blame] | 84 | * Set up an interest-in-callbacks record for a volume on a server and |
| 85 | * register it with the server. |
David Howells | d4a96be | 2018-05-10 08:43:04 +0100 | [diff] [blame] | 86 | * - Called with vnode->io_lock held. |
David Howells | c435ee3 | 2017-11-02 15:27:49 +0000 | [diff] [blame] | 87 | */ |
| 88 | int afs_register_server_cb_interest(struct afs_vnode *vnode, |
David Howells | d4a96be | 2018-05-10 08:43:04 +0100 | [diff] [blame] | 89 | struct afs_server_list *slist, |
| 90 | unsigned int index) |
David Howells | c435ee3 | 2017-11-02 15:27:49 +0000 | [diff] [blame] | 91 | { |
David Howells | d4a96be | 2018-05-10 08:43:04 +0100 | [diff] [blame] | 92 | struct afs_server_entry *entry = &slist->servers[index]; |
| 93 | struct afs_cb_interest *cbi, *vcbi, *new, *old; |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 94 | struct afs_server *server = entry->server; |
David Howells | 08e0e7c | 2007-04-26 15:55:03 -0700 | [diff] [blame] | 95 | |
David Howells | c435ee3 | 2017-11-02 15:27:49 +0000 | [diff] [blame] | 96 | again: |
David Howells | d4a96be | 2018-05-10 08:43:04 +0100 | [diff] [blame] | 97 | if (vnode->cb_interest && |
| 98 | likely(vnode->cb_interest == entry->cb_interest)) |
| 99 | return 0; |
| 100 | |
| 101 | read_lock(&slist->lock); |
| 102 | cbi = afs_get_cb_interest(entry->cb_interest); |
| 103 | read_unlock(&slist->lock); |
| 104 | |
David Howells | c435ee3 | 2017-11-02 15:27:49 +0000 | [diff] [blame] | 105 | vcbi = vnode->cb_interest; |
| 106 | if (vcbi) { |
David Howells | d4a96be | 2018-05-10 08:43:04 +0100 | [diff] [blame] | 107 | if (vcbi == cbi) { |
David Howells | c435ee3 | 2017-11-02 15:27:49 +0000 | [diff] [blame] | 108 | afs_put_cb_interest(afs_v2net(vnode), cbi); |
| 109 | return 0; |
| 110 | } |
| 111 | |
David Howells | d4a96be | 2018-05-10 08:43:04 +0100 | [diff] [blame] | 112 | /* Use a new interest in the server list for the same server |
| 113 | * rather than an old one that's still attached to a vnode. |
| 114 | */ |
| 115 | if (cbi && vcbi->server == cbi->server) { |
| 116 | write_seqlock(&vnode->cb_lock); |
| 117 | old = vnode->cb_interest; |
| 118 | vnode->cb_interest = cbi; |
| 119 | write_sequnlock(&vnode->cb_lock); |
| 120 | afs_put_cb_interest(afs_v2net(vnode), old); |
| 121 | return 0; |
| 122 | } |
| 123 | |
| 124 | /* Re-use the one attached to the vnode. */ |
David Howells | c435ee3 | 2017-11-02 15:27:49 +0000 | [diff] [blame] | 125 | if (!cbi && vcbi->server == server) { |
David Howells | d4a96be | 2018-05-10 08:43:04 +0100 | [diff] [blame] | 126 | write_lock(&slist->lock); |
| 127 | if (entry->cb_interest) { |
| 128 | write_unlock(&slist->lock); |
| 129 | afs_put_cb_interest(afs_v2net(vnode), cbi); |
David Howells | c435ee3 | 2017-11-02 15:27:49 +0000 | [diff] [blame] | 130 | goto again; |
| 131 | } |
David Howells | d4a96be | 2018-05-10 08:43:04 +0100 | [diff] [blame] | 132 | |
| 133 | entry->cb_interest = cbi; |
| 134 | write_unlock(&slist->lock); |
David Howells | c435ee3 | 2017-11-02 15:27:49 +0000 | [diff] [blame] | 135 | return 0; |
| 136 | } |
| 137 | } |
| 138 | |
| 139 | if (!cbi) { |
David Howells | 47ea0f2 | 2018-06-15 15:24:50 +0100 | [diff] [blame^] | 140 | new = afs_create_interest(server, vnode); |
David Howells | c435ee3 | 2017-11-02 15:27:49 +0000 | [diff] [blame] | 141 | if (!new) |
| 142 | return -ENOMEM; |
| 143 | |
David Howells | d4a96be | 2018-05-10 08:43:04 +0100 | [diff] [blame] | 144 | write_lock(&slist->lock); |
| 145 | if (!entry->cb_interest) { |
| 146 | entry->cb_interest = afs_get_cb_interest(new); |
David Howells | c435ee3 | 2017-11-02 15:27:49 +0000 | [diff] [blame] | 147 | cbi = new; |
David Howells | d4a96be | 2018-05-10 08:43:04 +0100 | [diff] [blame] | 148 | new = NULL; |
David Howells | c435ee3 | 2017-11-02 15:27:49 +0000 | [diff] [blame] | 149 | } else { |
David Howells | d4a96be | 2018-05-10 08:43:04 +0100 | [diff] [blame] | 150 | cbi = afs_get_cb_interest(entry->cb_interest); |
David Howells | c435ee3 | 2017-11-02 15:27:49 +0000 | [diff] [blame] | 151 | } |
David Howells | d4a96be | 2018-05-10 08:43:04 +0100 | [diff] [blame] | 152 | write_unlock(&slist->lock); |
| 153 | afs_put_cb_interest(afs_v2net(vnode), new); |
David Howells | c435ee3 | 2017-11-02 15:27:49 +0000 | [diff] [blame] | 154 | } |
| 155 | |
| 156 | ASSERT(cbi); |
| 157 | |
| 158 | /* Change the server the vnode is using. This entails scrubbing any |
| 159 | * interest the vnode had in the previous server it was using. |
| 160 | */ |
| 161 | write_seqlock(&vnode->cb_lock); |
| 162 | |
David Howells | d4a96be | 2018-05-10 08:43:04 +0100 | [diff] [blame] | 163 | old = vnode->cb_interest; |
| 164 | vnode->cb_interest = cbi; |
David Howells | c435ee3 | 2017-11-02 15:27:49 +0000 | [diff] [blame] | 165 | vnode->cb_s_break = cbi->server->cb_s_break; |
David Howells | 68251f0 | 2018-05-12 22:31:33 +0100 | [diff] [blame] | 166 | vnode->cb_v_break = vnode->volume->cb_v_break; |
David Howells | c435ee3 | 2017-11-02 15:27:49 +0000 | [diff] [blame] | 167 | clear_bit(AFS_VNODE_CB_PROMISED, &vnode->flags); |
| 168 | |
| 169 | write_sequnlock(&vnode->cb_lock); |
David Howells | d4a96be | 2018-05-10 08:43:04 +0100 | [diff] [blame] | 170 | afs_put_cb_interest(afs_v2net(vnode), old); |
David Howells | c435ee3 | 2017-11-02 15:27:49 +0000 | [diff] [blame] | 171 | return 0; |
| 172 | } |
| 173 | |
| 174 | /* |
David Howells | c435ee3 | 2017-11-02 15:27:49 +0000 | [diff] [blame] | 175 | * Remove an interest on a server. |
| 176 | */ |
| 177 | void afs_put_cb_interest(struct afs_net *net, struct afs_cb_interest *cbi) |
| 178 | { |
David Howells | 47ea0f2 | 2018-06-15 15:24:50 +0100 | [diff] [blame^] | 179 | struct afs_vol_interest *vi; |
| 180 | |
David Howells | c435ee3 | 2017-11-02 15:27:49 +0000 | [diff] [blame] | 181 | if (cbi && refcount_dec_and_test(&cbi->usage)) { |
David Howells | 47ea0f2 | 2018-06-15 15:24:50 +0100 | [diff] [blame^] | 182 | if (!hlist_unhashed(&cbi->cb_vlink)) { |
David Howells | c435ee3 | 2017-11-02 15:27:49 +0000 | [diff] [blame] | 183 | write_lock(&cbi->server->cb_break_lock); |
David Howells | 47ea0f2 | 2018-06-15 15:24:50 +0100 | [diff] [blame^] | 184 | |
| 185 | hlist_del_init(&cbi->cb_vlink); |
| 186 | vi = cbi->vol_interest; |
| 187 | cbi->vol_interest = NULL; |
| 188 | if (--vi->usage == 0) |
| 189 | hlist_del(&vi->srv_link); |
| 190 | else |
| 191 | vi = NULL; |
| 192 | |
David Howells | c435ee3 | 2017-11-02 15:27:49 +0000 | [diff] [blame] | 193 | write_unlock(&cbi->server->cb_break_lock); |
David Howells | 47ea0f2 | 2018-06-15 15:24:50 +0100 | [diff] [blame^] | 194 | kfree(vi); |
David Howells | c435ee3 | 2017-11-02 15:27:49 +0000 | [diff] [blame] | 195 | afs_put_server(net, cbi->server); |
| 196 | } |
| 197 | kfree(cbi); |
| 198 | } |
| 199 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 200 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 201 | /* |
| 202 | * allow the fileserver to request callback state (re-)initialisation |
| 203 | */ |
David Howells | 08e0e7c | 2007-04-26 15:55:03 -0700 | [diff] [blame] | 204 | void afs_init_callback_state(struct afs_server *server) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 205 | { |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 206 | if (!test_and_clear_bit(AFS_SERVER_FL_NEW, &server->flags)) |
David Howells | c435ee3 | 2017-11-02 15:27:49 +0000 | [diff] [blame] | 207 | server->cb_s_break++; |
David Howells | 08e0e7c | 2007-04-26 15:55:03 -0700 | [diff] [blame] | 208 | } |
| 209 | |
| 210 | /* |
| 211 | * actually break a callback |
| 212 | */ |
David Howells | c435ee3 | 2017-11-02 15:27:49 +0000 | [diff] [blame] | 213 | void afs_break_callback(struct afs_vnode *vnode) |
David Howells | 08e0e7c | 2007-04-26 15:55:03 -0700 | [diff] [blame] | 214 | { |
| 215 | _enter(""); |
| 216 | |
David Howells | c435ee3 | 2017-11-02 15:27:49 +0000 | [diff] [blame] | 217 | write_seqlock(&vnode->cb_lock); |
David Howells | 08e0e7c | 2007-04-26 15:55:03 -0700 | [diff] [blame] | 218 | |
David Howells | 5a81327 | 2018-04-06 14:17:26 +0100 | [diff] [blame] | 219 | clear_bit(AFS_VNODE_NEW_CONTENT, &vnode->flags); |
David Howells | c435ee3 | 2017-11-02 15:27:49 +0000 | [diff] [blame] | 220 | if (test_and_clear_bit(AFS_VNODE_CB_PROMISED, &vnode->flags)) { |
| 221 | vnode->cb_break++; |
| 222 | afs_clear_permits(vnode); |
| 223 | |
David Howells | 08e0e7c | 2007-04-26 15:55:03 -0700 | [diff] [blame] | 224 | spin_lock(&vnode->lock); |
| 225 | |
| 226 | _debug("break callback"); |
| 227 | |
David Howells | e8d6c55 | 2007-07-15 23:40:12 -0700 | [diff] [blame] | 228 | if (list_empty(&vnode->granted_locks) && |
| 229 | !list_empty(&vnode->pending_locks)) |
| 230 | afs_lock_may_be_available(vnode); |
David Howells | 08e0e7c | 2007-04-26 15:55:03 -0700 | [diff] [blame] | 231 | spin_unlock(&vnode->lock); |
| 232 | } |
David Howells | c435ee3 | 2017-11-02 15:27:49 +0000 | [diff] [blame] | 233 | |
| 234 | write_sequnlock(&vnode->cb_lock); |
David Howells | 08e0e7c | 2007-04-26 15:55:03 -0700 | [diff] [blame] | 235 | } |
| 236 | |
| 237 | /* |
| 238 | * allow the fileserver to explicitly break one callback |
| 239 | * - happens when |
| 240 | * - the backing file is changed |
| 241 | * - a lock is released |
| 242 | */ |
| 243 | static void afs_break_one_callback(struct afs_server *server, |
| 244 | struct afs_fid *fid) |
| 245 | { |
David Howells | 47ea0f2 | 2018-06-15 15:24:50 +0100 | [diff] [blame^] | 246 | struct afs_vol_interest *vi; |
David Howells | c435ee3 | 2017-11-02 15:27:49 +0000 | [diff] [blame] | 247 | struct afs_cb_interest *cbi; |
| 248 | struct afs_iget_data data; |
David Howells | 08e0e7c | 2007-04-26 15:55:03 -0700 | [diff] [blame] | 249 | struct afs_vnode *vnode; |
David Howells | c435ee3 | 2017-11-02 15:27:49 +0000 | [diff] [blame] | 250 | struct inode *inode; |
David Howells | 08e0e7c | 2007-04-26 15:55:03 -0700 | [diff] [blame] | 251 | |
David Howells | c435ee3 | 2017-11-02 15:27:49 +0000 | [diff] [blame] | 252 | read_lock(&server->cb_break_lock); |
David Howells | 47ea0f2 | 2018-06-15 15:24:50 +0100 | [diff] [blame^] | 253 | hlist_for_each_entry(vi, &server->cb_volumes, srv_link) { |
| 254 | if (vi->vid < fid->vid) |
| 255 | continue; |
| 256 | if (vi->vid > fid->vid) { |
| 257 | vi = NULL; |
| 258 | break; |
| 259 | } |
| 260 | //atomic_inc(&vi->usage); |
| 261 | break; |
| 262 | } |
| 263 | |
| 264 | /* TODO: Find all matching volumes if we couldn't match the server and |
| 265 | * break them anyway. |
| 266 | */ |
| 267 | if (!vi) |
| 268 | goto out; |
David Howells | c435ee3 | 2017-11-02 15:27:49 +0000 | [diff] [blame] | 269 | |
| 270 | /* Step through all interested superblocks. There may be more than one |
| 271 | * because of cell aliasing. |
| 272 | */ |
David Howells | 47ea0f2 | 2018-06-15 15:24:50 +0100 | [diff] [blame^] | 273 | hlist_for_each_entry(cbi, &vi->cb_interests, cb_vlink) { |
David Howells | 68251f0 | 2018-05-12 22:31:33 +0100 | [diff] [blame] | 274 | if (fid->vnode == 0 && fid->unique == 0) { |
| 275 | /* The callback break applies to an entire volume. */ |
| 276 | struct afs_super_info *as = AFS_FS_S(cbi->sb); |
| 277 | struct afs_volume *volume = as->volume; |
| 278 | |
| 279 | write_lock(&volume->cb_break_lock); |
| 280 | volume->cb_v_break++; |
| 281 | write_unlock(&volume->cb_break_lock); |
| 282 | } else { |
| 283 | data.volume = NULL; |
| 284 | data.fid = *fid; |
| 285 | inode = ilookup5_nowait(cbi->sb, fid->vnode, |
| 286 | afs_iget5_test, &data); |
| 287 | if (inode) { |
| 288 | vnode = AFS_FS_I(inode); |
| 289 | afs_break_callback(vnode); |
| 290 | iput(inode); |
| 291 | } |
David Howells | c435ee3 | 2017-11-02 15:27:49 +0000 | [diff] [blame] | 292 | } |
David Howells | 08e0e7c | 2007-04-26 15:55:03 -0700 | [diff] [blame] | 293 | } |
| 294 | |
David Howells | 47ea0f2 | 2018-06-15 15:24:50 +0100 | [diff] [blame^] | 295 | out: |
David Howells | c435ee3 | 2017-11-02 15:27:49 +0000 | [diff] [blame] | 296 | read_unlock(&server->cb_break_lock); |
David Howells | ec26815 | 2007-04-26 15:49:28 -0700 | [diff] [blame] | 297 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 298 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 299 | /* |
| 300 | * allow the fileserver to break callback promises |
| 301 | */ |
David Howells | 08e0e7c | 2007-04-26 15:55:03 -0700 | [diff] [blame] | 302 | void afs_break_callbacks(struct afs_server *server, size_t count, |
David Howells | 5cf9dd5 | 2018-04-09 21:12:31 +0100 | [diff] [blame] | 303 | struct afs_callback_break *callbacks) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 304 | { |
David Howells | 08e0e7c | 2007-04-26 15:55:03 -0700 | [diff] [blame] | 305 | _enter("%p,%zu,", server, count); |
| 306 | |
| 307 | ASSERT(server != NULL); |
| 308 | ASSERTCMP(count, <=, AFSCBMAX); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 309 | |
David Howells | 68251f0 | 2018-05-12 22:31:33 +0100 | [diff] [blame] | 310 | /* TODO: Sort the callback break list by volume ID */ |
| 311 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 312 | for (; count > 0; callbacks++, count--) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 313 | _debug("- Fid { vl=%08x n=%u u=%u } CB { v=%u x=%u t=%u }", |
| 314 | callbacks->fid.vid, |
| 315 | callbacks->fid.vnode, |
| 316 | callbacks->fid.unique, |
David Howells | 5cf9dd5 | 2018-04-09 21:12:31 +0100 | [diff] [blame] | 317 | callbacks->cb.version, |
| 318 | callbacks->cb.expiry, |
| 319 | callbacks->cb.type |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 320 | ); |
David Howells | 08e0e7c | 2007-04-26 15:55:03 -0700 | [diff] [blame] | 321 | afs_break_one_callback(server, &callbacks->fid); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 322 | } |
| 323 | |
David Howells | 08e0e7c | 2007-04-26 15:55:03 -0700 | [diff] [blame] | 324 | _leave(""); |
| 325 | return; |
David Howells | ec26815 | 2007-04-26 15:49:28 -0700 | [diff] [blame] | 326 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 327 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 328 | /* |
David Howells | c435ee3 | 2017-11-02 15:27:49 +0000 | [diff] [blame] | 329 | * Clear the callback interests in a server list. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 330 | */ |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 331 | void afs_clear_callback_interests(struct afs_net *net, struct afs_server_list *slist) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 332 | { |
David Howells | c435ee3 | 2017-11-02 15:27:49 +0000 | [diff] [blame] | 333 | int i; |
David Howells | 08e0e7c | 2007-04-26 15:55:03 -0700 | [diff] [blame] | 334 | |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 335 | for (i = 0; i < slist->nr_servers; i++) { |
| 336 | afs_put_cb_interest(net, slist->servers[i].cb_interest); |
| 337 | slist->servers[i].cb_interest = NULL; |
David Howells | 08e0e7c | 2007-04-26 15:55:03 -0700 | [diff] [blame] | 338 | } |
David Howells | 08e0e7c | 2007-04-26 15:55:03 -0700 | [diff] [blame] | 339 | } |