aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfs/inode.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 /fs/hfs/inode.c
parent3c333937ee3be114b181c4861188cfe8f6a59697 (diff)
downloadkernel_samsung_tuna-516e0cc5646f377ab80fcc2ee639892eccb99853.zip
kernel_samsung_tuna-516e0cc5646f377ab80fcc2ee639892eccb99853.tar.gz
kernel_samsung_tuna-516e0cc5646f377ab80fcc2ee639892eccb99853.tar.bz2
[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/inode.c')
-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 aa73f3f..7e19835 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);