diff options
author | David Howells <dhowells@redhat.com> | 2017-11-02 18:27:46 +0300 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2017-11-13 18:38:17 +0300 |
commit | 9ed900b1160ef306bc74ad0228d7ab199234c758 (patch) | |
tree | f2e3ed236dce6980e51e8216e9e06ffbf9c1d989 /fs/afs/vlocation.c | |
parent | 49566f6f06b38d7c1a5c7eacc8a38c6ea2e36549 (diff) | |
download | linux-9ed900b1160ef306bc74ad0228d7ab199234c758.tar.xz |
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/vlocation.c')
-rw-r--r-- | fs/afs/vlocation.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/afs/vlocation.c b/fs/afs/vlocation.c index ccb7aacfbeca..cf7e02d5fa3f 100644 --- a/fs/afs/vlocation.c +++ b/fs/afs/vlocation.c @@ -518,14 +518,14 @@ void afs_put_vlocation(struct afs_net *net, struct afs_vlocation *vl) /* * destroy a dead volume location record */ -static void afs_vlocation_destroy(struct afs_vlocation *vl) +static void afs_vlocation_destroy(struct afs_net *net, struct afs_vlocation *vl) { _enter("%p", vl); #ifdef CONFIG_AFS_FSCACHE fscache_relinquish_cookie(vl->cache, 0); #endif - afs_put_cell(vl->cell); + afs_put_cell(net, vl->cell); kfree(vl); } @@ -580,7 +580,7 @@ void afs_vlocation_reaper(struct work_struct *work) while (!list_empty(&corpses)) { vl = list_entry(corpses.next, struct afs_vlocation, grave); list_del(&vl->grave); - afs_vlocation_destroy(vl); + afs_vlocation_destroy(net, vl); } _leave(""); |