linux-unionfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: linux-unionfs@vger.kernel.org
Cc: Amir Goldstein <amir73il@gmail.com>, Miklos Szeredi <miklos@szeredi.hu>
Subject: Re: [PATCH V2] ovl: Pass ovl_get_nlink() parameters in right order
Date: Mon, 27 Nov 2017 16:26:12 -0500	[thread overview]
Message-ID: <20171127212612.GD22007@redhat.com> (raw)
In-Reply-To: <20171127184613.GB22007@redhat.com>

On Mon, Nov 27, 2017 at 01:46:13PM -0500, Vivek Goyal wrote:
> Right now we seem to be passing index as "lowerdentry" and origin.dentry
> as "upperdentry". IIUC, we should pass these parameters in reversed order
> and this looks like a bug.
> 

Hi,

Don't merge this patch yet. I think this breaks overlay/042 and does not
cleanup orphan index. Trying to debug it.

Vivek

> Fixes: caf70cb2ba5d ("ovl: cleanup orphan index entries")
> Cc: <stable@vger.kernel.org> #4.13
> Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
> ---
>  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 625ed8066570..5ef69bc09e0c 100644
> --- a/fs/overlayfs/namei.c
> +++ b/fs/overlayfs/namei.c
> @@ -435,7 +435,7 @@ int ovl_verify_index(struct dentry *index, struct ovl_path *lower,
>  
>  	/* Check if index is orphan and don't warn before cleaning it */
>  	if (d_inode(index)->i_nlink == 1 &&
> -	    ovl_get_nlink(index, origin.dentry, 0) == 0)
> +	    ovl_get_nlink(origin.dentry, index, 0) == 0)
>  		err = -ENOENT;
>  
>  	dput(origin.dentry);

  reply	other threads:[~2017-11-27 21:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-27 18:46 [PATCH V2] ovl: Pass ovl_get_nlink() parameters in right order Vivek Goyal
2017-11-27 21:26 ` Vivek Goyal [this message]
2017-11-28 12:58   ` Amir Goldstein
2017-11-28 14:18     ` Vivek Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171127212612.GD22007@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=amir73il@gmail.com \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).