aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ppp_generic.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2008-07-26 00:39:17 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2008-07-26 20:53:40 -0400
commit516e0cc5646f377ab80fcc2ee639892eccb99853 (patch)
treee06296dcedb42dbe397d237887873e70c5823d51 /drivers/net/ppp_generic.c
parent[PATCH] dup3 fix (diff)
downloadlinux-dev-516e0cc5646f377ab80fcc2ee639892eccb99853.tar.xz
linux-dev-516e0cc5646f377ab80fcc2ee639892eccb99853.zip
[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/ppp_generic.c')
-rw-r--r--drivers/net/ppp_generic.c6
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)
if (file == ppp->owner)
ppp_shutdown_interface(ppp);
}
- if (atomic_read(&file->f_count) <= 2) {
+ if (atomic_long_read(&file->f_count) <= 2) {
ppp_release(NULL, file);
err = 0;
} else
- printk(KERN_DEBUG "PPPIOCDETACH file->f_count=%d\n",
- atomic_read(&file->f_count));
+ printk(KERN_DEBUG "PPPIOCDETACH file->f_count=%ld\n",
+ atomic_long_read(&file->f_count));
unlock_kernel();
return err;
}