diff options
author | David Howells <dhowells@redhat.com> | 2017-11-02 11:27:46 -0400 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2017-11-13 10:38:17 -0500 |
commit | 9ed900b1160ef306bc74ad0228d7ab199234c758 (patch) | |
tree | f2e3ed236dce6980e51e8216e9e06ffbf9c1d989 /fs/afs/cmservice.c | |
parent | 49566f6f06b38d7c1a5c7eacc8a38c6ea2e36549 (diff) |
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/cmservice.c')
-rw-r--r-- | fs/afs/cmservice.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/afs/cmservice.c b/fs/afs/cmservice.c index 30ce4be4165f..9ad39f8a7e87 100644 --- a/fs/afs/cmservice.c +++ b/fs/afs/cmservice.c | |||
@@ -151,7 +151,7 @@ static void afs_cm_destructor(struct afs_call *call) | |||
151 | afs_break_callbacks(call->server, call->count, call->request); | 151 | afs_break_callbacks(call->server, call->count, call->request); |
152 | } | 152 | } |
153 | 153 | ||
154 | afs_put_server(call->server); | 154 | afs_put_server(call->net, call->server); |
155 | call->server = NULL; | 155 | call->server = NULL; |
156 | kfree(call->buffer); | 156 | kfree(call->buffer); |
157 | call->buffer = NULL; | 157 | call->buffer = NULL; |