diff options
Diffstat (limited to 'fs/open.c')
-rw-r--r-- | fs/open.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -701,7 +701,8 @@ static struct file *__dentry_open(struct dentry *dentry, struct vfsmount *mnt, | |||
701 | if (error) | 701 | if (error) |
702 | goto cleanup_all; | 702 | goto cleanup_all; |
703 | } | 703 | } |
704 | ima_counts_get(f); | 704 | if ((f->f_mode & (FMODE_READ | FMODE_WRITE)) == FMODE_READ) |
705 | i_readcount_inc(inode); | ||
705 | 706 | ||
706 | f->f_flags &= ~(O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC); | 707 | f->f_flags &= ~(O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC); |
707 | 708 | ||