aboutsummaryrefslogtreecommitdiffstats
path: root/fs/open.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/open.c')
-rw-r--r--fs/open.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/open.c b/fs/open.c
index b47aab39c057..80d430ae3b2d 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -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