summaryrefslogtreecommitdiffstats
path: root/fs/afs/inode.c
diff options
context:
space:
mode:
authorDavid Howells2017-11-02 16:27:46 +0100
committerDavid Howells2017-11-13 16:38:17 +0100
commit9ed900b1160ef306bc74ad0228d7ab199234c758 (patch)
treef2e3ed236dce6980e51e8216e9e06ffbf9c1d989 /fs/afs/inode.c
parentafs: Note the cell in the superblock info also (diff)
downloadkernel-qcow2-linux-9ed900b1160ef306bc74ad0228d7ab199234c758.tar.gz
kernel-qcow2-linux-9ed900b1160ef306bc74ad0228d7ab199234c758.tar.xz
kernel-qcow2-linux-9ed900b1160ef306bc74ad0228d7ab199234c758.zip
afs: Push the net ns pointer to more places
Push the network namespace pointer to more places in AFS, including the afs_server structure (which doesn't hold a ref on the netns). In particular, afs_put_cell() now takes requires a net ns parameter so that it can safely alter the netns after decrementing the cell usage count - the cell will be deallocated by a background thread after being cached for a period, which means that it's not safe to access it after reducing its usage count. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/inode.c')
-rw-r--r--fs/afs/inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/afs/inode.c b/fs/afs/inode.c
index 342316a9e3e0..fbb441d25022 100644
--- a/fs/afs/inode.c
+++ b/fs/afs/inode.c
@@ -437,7 +437,7 @@ void afs_evict_inode(struct inode *inode)
spin_lock(&vnode->server->fs_lock);
rb_erase(&vnode->server_rb, &vnode->server->fs_vnodes);
spin_unlock(&vnode->server->fs_lock);
- afs_put_server(vnode->server);
+ afs_put_server(afs_i2net(inode), vnode->server);
vnode->server = NULL;
}