commit | f7c72396d0de8847495f0ccb5853c711a7f91271 | [log] [tgz] |
---|---|---|
author | Miklos Szeredi <mszeredi@redhat.com> | Wed Jul 18 15:44:42 2018 +0200 |
committer | Miklos Szeredi <mszeredi@redhat.com> | Wed Jul 18 15:44:42 2018 +0200 |
tree | 6eb951647293987c85e3d018fbe8071980d91cbe | |
parent | 9e142c4102db44c3c7a2656de8a1e2ddda2fae71 [diff] |
ovl: add O_DIRECT support Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
diff --git a/fs/overlayfs/file.c b/fs/overlayfs/file.c index 7590e43..c49af24 100644 --- a/fs/overlayfs/file.c +++ b/fs/overlayfs/file.c
@@ -110,6 +110,9 @@ static int ovl_open(struct inode *inode, struct file *file) if (IS_ERR(realfile)) return PTR_ERR(realfile); + /* For O_DIRECT dentry_open() checks f_mapping->a_ops->direct_IO */ + file->f_mapping = realfile->f_mapping; + file->private_data = realfile; return 0;