Re: [PATCH 3/3] ovl: do not follow non-dir origin with redirect_dir=nofollow

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 13, 2020 at 4:20 PM Amir Goldstein <amir73il@xxxxxxxxx> wrote:
>
> Following non-dir origin can result in some bugs when underlying layers
> are edited offline.

Sorry, lost track.  What bugs this results in?

Thanks,
Miklos

  To be on the safe side, do not follow non-dir
> origin when not following redirects.  This will make overlay lookup
> with "redirect_dir=nofollow" behave as pre kernel v4.12 lookup, before
> the introduction of the origin xattr.
>
> Link: https://lore.kernel.org/linux-unionfs/CAJfpegv9h7ubuGy_6K4OCdZd3R7Z4HGmCDB2L7mO5bVoGd6MSA@xxxxxxxxxxxxxx/
> Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx>
> ---
>  fs/overlayfs/namei.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/overlayfs/namei.c b/fs/overlayfs/namei.c
> index ae1c1216a038..31ee5a519736 100644
> --- a/fs/overlayfs/namei.c
> +++ b/fs/overlayfs/namei.c
> @@ -861,7 +861,7 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry,
>                         err = -EREMOTE;
>                         goto out;
>                 }
> -               if (upperdentry && !d.is_dir) {
> +               if (upperdentry && !d.is_dir && ofs->config.redirect_follow) {
>                         unsigned int origin_ctr = 0;
>
>                         /*
> --
> 2.17.1
>



[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux