]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - fs/open.c
[PATCH] xip: fs/mm: execute in place
[net-next-2.6.git] / fs / open.c
index 8ec63f735918d691d471bfc55bdb03c235b939b9..3f4a4286fdc4d7361c3f46d57b435863a0250494 100644 (file)
--- a/fs/open.c
+++ b/fs/open.c
@@ -808,7 +808,9 @@ struct file *dentry_open(struct dentry *dentry, struct vfsmount *mnt, int flags)
 
        /* NB: we're sure to have correct a_ops only after f_op->open */
        if (f->f_flags & O_DIRECT) {
-               if (!f->f_mapping->a_ops || !f->f_mapping->a_ops->direct_IO) {
+               if (!f->f_mapping->a_ops ||
+                   ((!f->f_mapping->a_ops->direct_IO) &&
+                   (!f->f_mapping->a_ops->get_xip_page))) {
                        fput(f);
                        f = ERR_PTR(-EINVAL);
                }