diff options
Diffstat (limited to 'fs/open.c')
-rw-r--r-- | fs/open.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -688,7 +688,8 @@ static struct file *__dentry_open(struct dentry *dentry, struct vfsmount *mnt, | |||
688 | if (error) | 688 | if (error) |
689 | goto cleanup_all; | 689 | goto cleanup_all; |
690 | } | 690 | } |
691 | ima_counts_get(f); | 691 | if ((f->f_mode & (FMODE_READ | FMODE_WRITE)) == FMODE_READ) |
692 | i_readcount_inc(inode); | ||
692 | 693 | ||
693 | f->f_flags &= ~(O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC); | 694 | f->f_flags &= ~(O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC); |
694 | 695 | ||