]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - fs/open.c
Merge branch 'next' into for-linus
[mv-sheeva.git] / fs / open.c
index b47aab39c0572242c607495c37c15928fbf8290c..80d430ae3b2d32276e047e086ec91987b63a6fa8 100644 (file)
--- 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);