ACK: [SRU][FOCAL][PATCH 2/2] Revert "UBUNTU: SAUCE: overlayfs: use shiftfs hacks only with shiftfs as underlay"
Colin Ian King
colin.king at canonical.com
Thu May 21 11:22:10 UTC 2020
On 21/05/2020 12:12, Kleber Sacilotto de Souza wrote:
> BugLink: https://bugs.launchpad.net/bugs/1879690
>
> This reverts commit 6f18a8434050333afc80b5bfce2e0e994c86b790.
>
> The change applied for LP: #1857257 and its followup fix LP: #1876645
> introduced a regression on overlayfs. Revert these commits for now.
>
> Signed-off-by: Kleber Sacilotto de Souza <kleber.souza at canonical.com>
> ---
> fs/overlayfs/file.c | 10 +++-------
> 1 file changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/fs/overlayfs/file.c b/fs/overlayfs/file.c
> index a2faa086ee4b..1a1c1746bf83 100644
> --- a/fs/overlayfs/file.c
> +++ b/fs/overlayfs/file.c
> @@ -3,7 +3,6 @@
> * Copyright (C) 2017 Red Hat, Inc.
> */
>
> -#include <uapi/linux/magic.h>
> #include <linux/cred.h>
> #include <linux/file.h>
> #include <linux/mount.h>
> @@ -32,12 +31,9 @@ static struct file *ovl_open_realfile(const struct file *file,
> int flags = file->f_flags | O_NOATIME | FMODE_NONOTIFY;
>
> old_cred = ovl_override_creds(inode->i_sb);
> - if (realpath.dentry->d_sb->s_magic == SHIFTFS_MAGIC)
> - realfile = open_with_fake_path(&realpath, flags, realinode,
> - current_cred());
> - else
> - realfile = open_with_fake_path(&file->f_path, flags, realinode,
> - current_cred());
> + ovl_path_real(file->f_path.dentry, &realpath);
> + realfile = open_with_fake_path(&realpath, flags, realinode,
> + current_cred());
> revert_creds(old_cred);
>
> pr_debug("open(%p[%pD2/%c], 0%o) -> (%p, 0%o)\n",
>
Acked-by: Colin Ian King <colin.king at canonical.com>
More information about the kernel-team
mailing list