aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfs
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/hfs
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 'fs/hfs')
-rw-r--r--fs/hfs/inode.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/hfs/inode.c b/fs/hfs/inode.c
index aa73f3fd5dd9..7e19835efa2e 100644
--- a/fs/hfs/inode.c
+++ b/fs/hfs/inode.c
@@ -522,8 +522,6 @@ static int hfs_file_open(struct inode *inode, struct file *file)
{
if (HFS_IS_RSRC(inode))
inode = HFS_I(inode)->rsrc_inode;
- if (atomic_read(&file->f_count) != 1)
- return 0;
atomic_inc(&HFS_I(inode)->opencnt);
return 0;
}
@@ -534,8 +532,6 @@ static int hfs_file_release(struct inode *inode, struct file *file)
if (HFS_IS_RSRC(inode))
inode = HFS_I(inode)->rsrc_inode;
- if (atomic_read(&file->f_count) != 0)
- return 0;
if (atomic_dec_and_test(&HFS_I(inode)->opencnt)) {
mutex_lock(&inode->i_mutex);
hfs_file_truncate(inode);