[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>
This commit is contained in:
committed by
Linus Torvalds
parent
a57004e1af
commit
095975da26
@ -9,7 +9,6 @@
|
||||
#include <linux/config.h>
|
||||
#include <linux/limits.h>
|
||||
#include <linux/ioctl.h>
|
||||
#include <linux/rcuref.h>
|
||||
|
||||
/*
|
||||
* It's silly to have NR_OPEN bigger than NR_FILE, but you can change
|
||||
@ -653,7 +652,7 @@ extern spinlock_t files_lock;
|
||||
#define file_list_lock() spin_lock(&files_lock);
|
||||
#define file_list_unlock() spin_unlock(&files_lock);
|
||||
|
||||
#define get_file(x) rcuref_inc(&(x)->f_count)
|
||||
#define get_file(x) atomic_inc(&(x)->f_count)
|
||||
#define file_count(x) atomic_read(&(x)->f_count)
|
||||
|
||||
#define MAX_NON_LFS ((1UL<<31) - 1)
|
||||
|
Reference in New Issue
Block a user