]> Pileus Git - ~andy/linux/blobdiff - fs/open.c
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
[~andy/linux] / fs / open.c
index 3cac0bda46df8511e03ddc3cf7631fc33b989645..f83ca80cc59a1d72c8b933d7562efc853cfe3f8c 100644 (file)
--- a/fs/open.c
+++ b/fs/open.c
@@ -714,7 +714,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);