|
@@ -504,6 +504,11 @@ static const struct inode_operations ovl_special_inode_operations = {
|
|
|
.update_time = ovl_update_time,
|
|
|
};
|
|
|
|
|
|
+const struct address_space_operations ovl_aops = {
|
|
|
+ /* For O_DIRECT dentry_open() checks f_mapping->a_ops->direct_IO */
|
|
|
+ .direct_IO = noop_direct_IO,
|
|
|
+};
|
|
|
+
|
|
|
/*
|
|
|
* It is possible to stack overlayfs instance on top of another
|
|
|
* overlayfs instance as lower layer. We need to annonate the
|
|
@@ -575,6 +580,7 @@ static void ovl_fill_inode(struct inode *inode, umode_t mode, dev_t rdev,
|
|
|
case S_IFREG:
|
|
|
inode->i_op = &ovl_file_inode_operations;
|
|
|
inode->i_fop = &ovl_file_operations;
|
|
|
+ inode->i_mapping->a_ops = &ovl_aops;
|
|
|
break;
|
|
|
|
|
|
case S_IFDIR:
|