summaryrefslogtreecommitdiff
path: root/fs/file_table.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2006-01-09 19:18:33 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-01-09 19:18:33 +0000
commit0a3a98f6dd4e8f4d928a09302c0d1c56f2192ac3 (patch)
tree92f55e374a84d06ce8213a4540454760fdecf137 /fs/file_table.c
parent8ef12c9f01afba47c2d33bb939085111ca0d0f7d (diff)
parent5367f2d67c7d0bf1faae90e6e7b4e2ac3c9b5e0f (diff)
downloadlinux-3.10-0a3a98f6dd4e8f4d928a09302c0d1c56f2192ac3.tar.gz
linux-3.10-0a3a98f6dd4e8f4d928a09302c0d1c56f2192ac3.tar.bz2
linux-3.10-0a3a98f6dd4e8f4d928a09302c0d1c56f2192ac3.zip
Merge Linus' tree.
Diffstat (limited to 'fs/file_table.c')
-rw-r--r--fs/file_table.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/file_table.c b/fs/file_table.c
index c3a5e2fd663..6142250104a 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -117,7 +117,7 @@ EXPORT_SYMBOL(get_empty_filp);
void fastcall fput(struct file *file)
{
- if (rcuref_dec_and_test(&file->f_count))
+ if (atomic_dec_and_test(&file->f_count))
__fput(file);
}
@@ -166,7 +166,7 @@ struct file fastcall *fget(unsigned int fd)
rcu_read_lock();
file = fcheck_files(files, fd);
if (file) {
- if (!rcuref_inc_lf(&file->f_count)) {
+ if (!atomic_inc_not_zero(&file->f_count)) {
/* File object ref couldn't be taken */
rcu_read_unlock();
return NULL;
@@ -198,7 +198,7 @@ struct file fastcall *fget_light(unsigned int fd, int *fput_needed)
rcu_read_lock();
file = fcheck_files(files, fd);
if (file) {
- if (rcuref_inc_lf(&file->f_count))
+ if (atomic_inc_not_zero(&file->f_count))
*fput_needed = 1;
else
/* Didn't get the reference, someone's freed */
@@ -213,7 +213,7 @@ struct file fastcall *fget_light(unsigned int fd, int *fput_needed)
void put_filp(struct file *file)
{
- if (rcuref_dec_and_test(&file->f_count)) {
+ if (atomic_dec_and_test(&file->f_count)) {
security_file_free(file);
file_kill(file);
file_free(file);