aboutsummaryrefslogtreecommitdiffstats
path: root/fs/afs/vnode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/afs/vnode.c')
-rw-r--r--fs/afs/vnode.c33
1 files changed, 21 insertions, 12 deletions
diff --git a/fs/afs/vnode.c b/fs/afs/vnode.c
index ec814660209f..bea8bd9e7b2a 100644
--- a/fs/afs/vnode.c
+++ b/fs/afs/vnode.c
@@ -175,24 +175,33 @@ static void afs_vnode_deleted_remotely(struct afs_vnode *vnode)
175{ 175{
176 struct afs_server *server; 176 struct afs_server *server;
177 177
178 _enter("{%p}", vnode->server);
179
178 set_bit(AFS_VNODE_DELETED, &vnode->flags); 180 set_bit(AFS_VNODE_DELETED, &vnode->flags);
179 181
180 server = vnode->server; 182 server = vnode->server;
181 if (vnode->cb_promised) { 183 if (server) {
182 spin_lock(&server->cb_lock);
183 if (vnode->cb_promised) { 184 if (vnode->cb_promised) {
184 rb_erase(&vnode->cb_promise, &server->cb_promises); 185 spin_lock(&server->cb_lock);
185 vnode->cb_promised = false; 186 if (vnode->cb_promised) {
187 rb_erase(&vnode->cb_promise,
188 &server->cb_promises);
189 vnode->cb_promised = false;
190 }
191 spin_unlock(&server->cb_lock);
186 } 192 }
187 spin_unlock(&server->cb_lock);
188 }
189 193
190 spin_lock(&vnode->server->fs_lock); 194 spin_lock(&server->fs_lock);
191 rb_erase(&vnode->server_rb, &vnode->server->fs_vnodes); 195 rb_erase(&vnode->server_rb, &server->fs_vnodes);
192 spin_unlock(&vnode->server->fs_lock); 196 spin_unlock(&server->fs_lock);
193 197
194 vnode->server = NULL; 198 vnode->server = NULL;
195 afs_put_server(server); 199 afs_put_server(server);
200 } else {
201 ASSERT(!vnode->cb_promised);
202 }
203
204 _leave("");
196} 205}
197 206
198/* 207/*
@@ -225,7 +234,7 @@ void afs_vnode_finalise_status_update(struct afs_vnode *vnode,
225 */ 234 */
226static void afs_vnode_status_update_failed(struct afs_vnode *vnode, int ret) 235static void afs_vnode_status_update_failed(struct afs_vnode *vnode, int ret)
227{ 236{
228 _enter("%p,%d", vnode, ret); 237 _enter("{%x:%u},%d", vnode->fid.vid, vnode->fid.vnode, ret);
229 238
230 spin_lock(&vnode->lock); 239 spin_lock(&vnode->lock);
231 240