diff options
author | Nick Piggin <nickpiggin@yahoo.com.au> | 2006-01-08 01:02:19 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-08 20:13:48 -0800 |
commit | 095975da26dba21698582e91e96be10f7417333f (patch) | |
tree | ce1ffac556d394ef56a18faa97d38f79b07f31e2 /fs/aio.c | |
parent | a57004e1afb6ee03c509f1b1ec74a000682ab93b (diff) | |
download | linux-3.10-095975da26dba21698582e91e96be10f7417333f.tar.gz linux-3.10-095975da26dba21698582e91e96be10f7417333f.tar.bz2 linux-3.10-095975da26dba21698582e91e96be10f7417333f.zip |
[PATCH] rcu file: use atomic primitives
Use atomic_inc_not_zero for rcu files instead of special case rcuref.
Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/aio.c')
-rw-r--r-- | fs/aio.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -29,7 +29,6 @@ #include <linux/highmem.h> #include <linux/workqueue.h> #include <linux/security.h> -#include <linux/rcuref.h> #include <asm/kmap_types.h> #include <asm/uaccess.h> @@ -514,7 +513,7 @@ static int __aio_put_req(struct kioctx *ctx, struct kiocb *req) /* Must be done under the lock to serialise against cancellation. * Call this aio_fput as it duplicates fput via the fput_work. */ - if (unlikely(rcuref_dec_and_test(&req->ki_filp->f_count))) { + if (unlikely(atomic_dec_and_test(&req->ki_filp->f_count))) { get_ioctx(ctx); spin_lock(&fput_lock); list_add(&req->ki_list, &fput_head); |