summaryrefslogtreecommitdiffstats
path: root/fs/open.c
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2011-03-15 23:41:17 +0100
committerJames Morris <jmorris@namei.org>2011-03-15 23:41:17 +0100
commita002951c97ff8da49938c982a4c236bf2fafdc9f (patch)
treed43e7885ea7376df0a47a0fc8ceca66dc5bfa357 /fs/open.c
parentLinux 2.6.38 (diff)
parentMerge branch 'security-next' of git://git.kernel.org/pub/scm/linux/kernel/git... (diff)
downloadlinux-a002951c97ff8da49938c982a4c236bf2fafdc9f.tar.xz
linux-a002951c97ff8da49938c982a4c236bf2fafdc9f.zip
Merge branch 'next' into for-linus
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,
if (error)
goto cleanup_all;
}
- ima_counts_get(f);
+ if ((f->f_mode & (FMODE_READ | FMODE_WRITE)) == FMODE_READ)
+ i_readcount_inc(inode);
f->f_flags &= ~(O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC);