diff options
Diffstat (limited to 'fs/file_table.c')
| -rw-r--r-- | fs/file_table.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/file_table.c b/fs/file_table.c index 83084225b4c3..f45a4493f9e7 100644 --- a/fs/file_table.c +++ b/fs/file_table.c | |||
| @@ -120,7 +120,7 @@ struct file *get_empty_filp(void) | |||
| 120 | 120 | ||
| 121 | tsk = current; | 121 | tsk = current; |
| 122 | INIT_LIST_HEAD(&f->f_u.fu_list); | 122 | INIT_LIST_HEAD(&f->f_u.fu_list); |
| 123 | atomic_set(&f->f_count, 1); | 123 | atomic_long_set(&f->f_count, 1); |
| 124 | rwlock_init(&f->f_owner.lock); | 124 | rwlock_init(&f->f_owner.lock); |
| 125 | f->f_uid = tsk->fsuid; | 125 | f->f_uid = tsk->fsuid; |
| 126 | f->f_gid = tsk->fsgid; | 126 | f->f_gid = tsk->fsgid; |
| @@ -219,7 +219,7 @@ EXPORT_SYMBOL(init_file); | |||
| 219 | 219 | ||
| 220 | void fput(struct file *file) | 220 | void fput(struct file *file) |
| 221 | { | 221 | { |
| 222 | if (atomic_dec_and_test(&file->f_count)) | 222 | if (atomic_long_dec_and_test(&file->f_count)) |
| 223 | __fput(file); | 223 | __fput(file); |
| 224 | } | 224 | } |
| 225 | 225 | ||
| @@ -294,7 +294,7 @@ struct file *fget(unsigned int fd) | |||
| 294 | rcu_read_lock(); | 294 | rcu_read_lock(); |
| 295 | file = fcheck_files(files, fd); | 295 | file = fcheck_files(files, fd); |
| 296 | if (file) { | 296 | if (file) { |
| 297 | if (!atomic_inc_not_zero(&file->f_count)) { | 297 | if (!atomic_long_inc_not_zero(&file->f_count)) { |
| 298 | /* File object ref couldn't be taken */ | 298 | /* File object ref couldn't be taken */ |
| 299 | rcu_read_unlock(); | 299 | rcu_read_unlock(); |
| 300 | return NULL; | 300 | return NULL; |
| @@ -326,7 +326,7 @@ struct file *fget_light(unsigned int fd, int *fput_needed) | |||
| 326 | rcu_read_lock(); | 326 | rcu_read_lock(); |
| 327 | file = fcheck_files(files, fd); | 327 | file = fcheck_files(files, fd); |
| 328 | if (file) { | 328 | if (file) { |
| 329 | if (atomic_inc_not_zero(&file->f_count)) | 329 | if (atomic_long_inc_not_zero(&file->f_count)) |
| 330 | *fput_needed = 1; | 330 | *fput_needed = 1; |
| 331 | else | 331 | else |
| 332 | /* Didn't get the reference, someone's freed */ | 332 | /* Didn't get the reference, someone's freed */ |
| @@ -341,7 +341,7 @@ struct file *fget_light(unsigned int fd, int *fput_needed) | |||
| 341 | 341 | ||
| 342 | void put_filp(struct file *file) | 342 | void put_filp(struct file *file) |
| 343 | { | 343 | { |
| 344 | if (atomic_dec_and_test(&file->f_count)) { | 344 | if (atomic_long_dec_and_test(&file->f_count)) { |
| 345 | security_file_free(file); | 345 | security_file_free(file); |
| 346 | file_kill(file); | 346 | file_kill(file); |
| 347 | file_free(file); | 347 | file_free(file); |
