aboutsummaryrefslogtreecommitdiffstats
path: root/fs/affs
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 /fs/affs
parent3c333937ee3be114b181c4861188cfe8f6a59697 (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 'fs/affs')
-rw-r--r--fs/affs/file.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/affs/file.c b/fs/affs/file.c
index 6eac7bdeec94..1377b1240b6e 100644
--- a/fs/affs/file.c
+++ b/fs/affs/file.c
@@ -46,8 +46,6 @@ const struct inode_operations affs_file_inode_operations = {
46static int 46static int
47affs_file_open(struct inode *inode, struct file *filp) 47affs_file_open(struct inode *inode, struct file *filp)
48{ 48{
49 if (atomic_read(&filp->f_count) != 1)
50 return 0;
51 pr_debug("AFFS: open(%lu,%d)\n", 49 pr_debug("AFFS: open(%lu,%d)\n",
52 inode->i_ino, atomic_read(&AFFS_I(inode)->i_opencnt)); 50 inode->i_ino, atomic_read(&AFFS_I(inode)->i_opencnt));
53 atomic_inc(&AFFS_I(inode)->i_opencnt); 51 atomic_inc(&AFFS_I(inode)->i_opencnt);
@@ -57,8 +55,6 @@ affs_file_open(struct inode *inode, struct file *filp)
57static int 55static int
58affs_file_release(struct inode *inode, struct file *filp) 56affs_file_release(struct inode *inode, struct file *filp)
59{ 57{
60 if (atomic_read(&filp->f_count) != 0)
61 return 0;
62 pr_debug("AFFS: release(%lu, %d)\n", 58 pr_debug("AFFS: release(%lu, %d)\n",
63 inode->i_ino, atomic_read(&AFFS_I(inode)->i_opencnt)); 59 inode->i_ino, atomic_read(&AFFS_I(inode)->i_opencnt));
64 60