Skip to content

Instantly share code, notes, and snippets.

@aszlig
Last active December 16, 2018 15:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aszlig/ed853b2f37321f88b46913f06780e89d to your computer and use it in GitHub Desktop.
Save aszlig/ed853b2f37321f88b46913f06780e89d to your computer and use it in GitHub Desktop.
{ lib, pkgs, ... }:
{
boot.kernelPatches = lib.singleton {
name = "revert-overlayfs-regression";
patch = pkgs.writeText "revert-overlayfs-regression.patch" ''
diff --git a/fs/open.c b/fs/open.c
index 0285ce7dbd51..46b55e184c96 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -876,8 +876,13 @@ EXPORT_SYMBOL(file_path);
*/
int vfs_open(const struct path *path, struct file *file)
{
+ struct dentry *dentry = d_real(path->dentry, NULL);
+
+ if (IS_ERR(dentry))
+ return PTR_ERR(dentry);
+
file->f_path = *path;
- return do_dentry_open(file, d_backing_inode(path->dentry), NULL);
+ return do_dentry_open(file, d_backing_inode(dentry), NULL);
}
${" "}
struct file *dentry_open(const struct path *path, int flags,
'';
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment