diff options
author | Dominique Martinet <asmadeus@codewreck.org> | 2020-11-03 09:35:57 +0100 |
---|---|---|
committer | Dominique Martinet <asmadeus@codewreck.org> | 2020-11-19 17:21:34 +0100 |
commit | ff5e72ebef41068789c93b0666cebde80cc8bd8c (patch) | |
tree | 9bd135437ae858644cd22cd1ee29063a543a0741 /net | |
parent | 9p: add refcount to p9_fid struct (diff) | |
download | linux-ff5e72ebef41068789c93b0666cebde80cc8bd8c.tar.xz linux-ff5e72ebef41068789c93b0666cebde80cc8bd8c.zip |
9p: apply review requests for fid refcounting
Fix style issues in parent commit ("apply review requests for fid
refcounting"), no functional change.
Link: http://lkml.kernel.org/r/1605802012-31133-2-git-send-email-asmadeus@codewreck.org
Fixes: 6636b6dcc3db ("9p: add refcount to p9_fid struct")
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/9p/client.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/9p/client.c b/net/9p/client.c index a6c8a915e0d8..ba4910138c5b 100644 --- a/net/9p/client.c +++ b/net/9p/client.c @@ -901,7 +901,7 @@ static struct p9_fid *p9_fid_create(struct p9_client *clnt) fid->clnt = clnt; fid->rdir = NULL; fid->fid = 0; - atomic_set(&fid->count, 1); + refcount_set(&fid->count, 1); idr_preload(GFP_KERNEL); spin_lock_irq(&clnt->lock); @@ -1466,7 +1466,7 @@ int p9_client_clunk(struct p9_fid *fid) dump_stack(); return 0; } - if (!atomic_dec_and_test(&fid->count)) + if (!refcount_dec_and_test(&fid->count)) return 0; again: |