diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2008-07-26 00:39:17 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-07-26 20:53:40 -0400 |
commit | 516e0cc5646f377ab80fcc2ee639892eccb99853 (patch) | |
tree | e06296dcedb42dbe397d237887873e70c5823d51 /drivers/net | |
parent | 3c333937ee3be114b181c4861188cfe8f6a59697 (diff) |
[PATCH] f_count may wrap around
make it atomic_long_t; while we are at it, get rid of useless checks in affs,
hfs and hpfs - ->open() always has it equal to 1, ->release() - to 0.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ppp_generic.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c index 739b3ab7bccc..ddccc074a76a 100644 --- a/drivers/net/ppp_generic.c +++ b/drivers/net/ppp_generic.c | |||
@@ -581,12 +581,12 @@ static long ppp_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
581 | if (file == ppp->owner) | 581 | if (file == ppp->owner) |
582 | ppp_shutdown_interface(ppp); | 582 | ppp_shutdown_interface(ppp); |
583 | } | 583 | } |
584 | if (atomic_read(&file->f_count) <= 2) { | 584 | if (atomic_long_read(&file->f_count) <= 2) { |
585 | ppp_release(NULL, file); | 585 | ppp_release(NULL, file); |
586 | err = 0; | 586 | err = 0; |
587 | } else | 587 | } else |
588 | printk(KERN_DEBUG "PPPIOCDETACH file->f_count=%d\n", | 588 | printk(KERN_DEBUG "PPPIOCDETACH file->f_count=%ld\n", |
589 | atomic_read(&file->f_count)); | 589 | atomic_long_read(&file->f_count)); |
590 | unlock_kernel(); | 590 | unlock_kernel(); |
591 | return err; | 591 | return err; |
592 | } | 592 | } |