Quick fix (not sure that it's fully correct)
diff --git a/fs/overlayfs/file.c b/fs/overlayfs/file.c index 943733d86da3..fa30b615076e 100644 --- a/fs/overlayfs/file.c +++ b/fs/overlayfs/file.c @@ -24,13 +24,16 @@ static char ovl_whatisit(struct inode *inode, struct inode *realinode) static struct file *ovl_open_realfile(const struct file *file, struct inode *realinode) { + struct path realpath; struct inode *inode = file_inode(file); struct file *realfile; const struct cred *old_cred; int flags = file->f_flags | O_NOATIME | FMODE_NONOTIFY;
old_cred = ovl_override_creds(inode->i_sb); - realfile = open_with_fake_path(&file->f_path, flags, realinode, + ovl_path_real(file->f_path.dentry, &realpath); + realpath.mnt = file->f_path.mnt; // important! + realfile = open_with_fake_path(&realpath, flags, realinode, current_cred()); revert_creds(old_cred);
Quick fix (not sure that it's fully correct)
diff --git a/fs/overlayfs/ file.c b/fs/overlayfs/ file.c .fa30b615076e 100644 file.c file.c realfile( const struct file *file,
struct inode *realinode)
index 943733d86da3.
--- a/fs/overlayfs/
+++ b/fs/overlayfs/
@@ -24,13 +24,16 @@ static char ovl_whatisit(struct inode *inode, struct inode *realinode)
static struct file *ovl_open_
{
+ struct path realpath;
struct inode *inode = file_inode(file);
struct file *realfile;
const struct cred *old_cred;
int flags = file->f_flags | O_NOATIME | FMODE_NONOTIFY;
old_cred = ovl_override_ creds(inode- >i_sb); fake_path( &file-> f_path, flags, realinode, real(file- >f_path. dentry, &realpath); fake_path( &realpath, flags, realinode,
current_ cred()) ;
revert_ creds(old_ cred);
- realfile = open_with_
+ ovl_path_
+ realpath.mnt = file->f_path.mnt; // important!
+ realfile = open_with_