diff options
Diffstat (limited to 'fs/open.c')
-rw-r--r-- | fs/open.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -714,7 +714,8 @@ static struct file *__dentry_open(struct dentry *dentry, struct vfsmount *mnt, | |||
714 | if (error) | 714 | if (error) |
715 | goto cleanup_all; | 715 | goto cleanup_all; |
716 | } | 716 | } |
717 | ima_counts_get(f); | 717 | if ((f->f_mode & (FMODE_READ | FMODE_WRITE)) == FMODE_READ) |
718 | i_readcount_inc(inode); | ||
718 | 719 | ||
719 | f->f_flags &= ~(O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC); | 720 | f->f_flags &= ~(O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC); |
720 | 721 | ||