mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
[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 <[email protected]>
This commit is contained in:
parent
3c333937ee
commit
516e0cc564
11 changed files with 27 additions and 39 deletions
|
|
@ -46,8 +46,6 @@ const struct inode_operations affs_file_inode_operations = {
|
|||
static int
|
||||
affs_file_open(struct inode *inode, struct file *filp)
|
||||
{
|
||||
if (atomic_read(&filp->f_count) != 1)
|
||||
return 0;
|
||||
pr_debug("AFFS: open(%lu,%d)\n",
|
||||
inode->i_ino, atomic_read(&AFFS_I(inode)->i_opencnt));
|
||||
atomic_inc(&AFFS_I(inode)->i_opencnt);
|
||||
|
|
@ -57,8 +55,6 @@ affs_file_open(struct inode *inode, struct file *filp)
|
|||
static int
|
||||
affs_file_release(struct inode *inode, struct file *filp)
|
||||
{
|
||||
if (atomic_read(&filp->f_count) != 0)
|
||||
return 0;
|
||||
pr_debug("AFFS: release(%lu, %d)\n",
|
||||
inode->i_ino, atomic_read(&AFFS_I(inode)->i_opencnt));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue