diff options
Diffstat (limited to 'fs/nfs/cache_lib.c')
-rw-r--r-- | fs/nfs/cache_lib.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfs/cache_lib.c b/fs/nfs/cache_lib.c index b60627bcfc62..ef6729568432 100644 --- a/fs/nfs/cache_lib.c +++ b/fs/nfs/cache_lib.c | |||
@@ -67,7 +67,7 @@ out: | |||
67 | */ | 67 | */ |
68 | void nfs_cache_defer_req_put(struct nfs_cache_defer_req *dreq) | 68 | void nfs_cache_defer_req_put(struct nfs_cache_defer_req *dreq) |
69 | { | 69 | { |
70 | if (atomic_dec_and_test(&dreq->count)) | 70 | if (refcount_dec_and_test(&dreq->count)) |
71 | kfree(dreq); | 71 | kfree(dreq); |
72 | } | 72 | } |
73 | 73 | ||
@@ -87,7 +87,7 @@ static struct cache_deferred_req *nfs_dns_cache_defer(struct cache_req *req) | |||
87 | 87 | ||
88 | dreq = container_of(req, struct nfs_cache_defer_req, req); | 88 | dreq = container_of(req, struct nfs_cache_defer_req, req); |
89 | dreq->deferred_req.revisit = nfs_dns_cache_revisit; | 89 | dreq->deferred_req.revisit = nfs_dns_cache_revisit; |
90 | atomic_inc(&dreq->count); | 90 | refcount_inc(&dreq->count); |
91 | 91 | ||
92 | return &dreq->deferred_req; | 92 | return &dreq->deferred_req; |
93 | } | 93 | } |
@@ -99,7 +99,7 @@ struct nfs_cache_defer_req *nfs_cache_defer_req_alloc(void) | |||
99 | dreq = kzalloc(sizeof(*dreq), GFP_KERNEL); | 99 | dreq = kzalloc(sizeof(*dreq), GFP_KERNEL); |
100 | if (dreq) { | 100 | if (dreq) { |
101 | init_completion(&dreq->completion); | 101 | init_completion(&dreq->completion); |
102 | atomic_set(&dreq->count, 1); | 102 | refcount_set(&dreq->count, 1); |
103 | dreq->req.defer = nfs_dns_cache_defer; | 103 | dreq->req.defer = nfs_dns_cache_defer; |
104 | } | 104 | } |
105 | return dreq; | 105 | return dreq; |