[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
@@ -1663,7 +1663,7 @@ static inline void flush_unauthorized_files(struct files_struct * files)
|
||||
continue;
|
||||
}
|
||||
if (devnull) {
|
||||
rcuref_inc(&devnull->f_count);
|
||||
get_file(devnull);
|
||||
} else {
|
||||
devnull = dentry_open(dget(selinux_null), mntget(selinuxfs_mount), O_RDWR);
|
||||
if (!devnull) {
|
||||
|
Reference in New Issue
Block a user