diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-01-18 04:04:24 +0100 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-02-01 00:20:28 +0100 |
commit | 9157c31dd610a127bc6f01bc1953cf8b80382040 (patch) | |
tree | 0552a17b2f047da4240a62d06b9fe58b162bad35 /fs/nfs/client.c | |
parent | NFSv4: Clean up nfs4_get_state_owner (diff) | |
download | linux-9157c31dd610a127bc6f01bc1953cf8b80382040.tar.xz linux-9157c31dd610a127bc6f01bc1953cf8b80382040.zip |
NFSv4: Replace state_owner->so_owner_id with an ida based allocator
We're unlikely to ever need more than 2^31 simultaneous open owners,
so let's replace the custom allocator with the generic ida allocator.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/client.c')
-rw-r--r-- | fs/nfs/client.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c index ca9a4aa38dff..8d1739d3424d 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c @@ -1092,6 +1092,7 @@ static struct nfs_server *nfs_alloc_server(void) return NULL; } + ida_init(&server->openowner_id); pnfs_init_server(server); return server; @@ -1117,6 +1118,7 @@ void nfs_free_server(struct nfs_server *server) nfs_put_client(server->nfs_client); + ida_destroy(&server->openowner_id); nfs_free_iostats(server->io_stats); bdi_destroy(&server->backing_dev_info); kfree(server); |