All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: linux-xfs <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH] xfs_repair: fix incorrect return value in namecheck()
Date: Thu, 31 Jan 2019 12:40:48 -0800	[thread overview]
Message-ID: <20190131204048.GD5761@magnolia> (raw)
In-Reply-To: <f17672e5-63eb-0f74-afdf-55ff006ee28d@redhat.com>

On Thu, Jan 31, 2019 at 02:20:58PM -0600, Eric Sandeen wrote:
> Obviously a directory entry with a '/' in the name should return
> 1, i.e. failure.  This was just a dumb thinko.
> 
> Fixes: 45571fd5885d ("xfs_repair: allow '/' in attribute names")
> 
> Reported-by: Darrick J. Wong <darrick.wong@oracle.com>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>

Looks ok,
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

(Sez me who complained about this weeks ago on IRC and then RVBd the
broken version so who knows where my brain went lunchtime lol...)

--D

> ---
> 
> diff --git a/repair/da_util.c b/repair/da_util.c
> index c5e690c..4a258e5 100644
> --- a/repair/da_util.c
> +++ b/repair/da_util.c
> @@ -31,7 +31,7 @@ namecheck(
>  
>  	for (c = name, i = 0; i < length; i++, c++) {
>  		if (isadir && *c == '/')
> -			return 0;
> +			return 1;
>  		if (*c == '\0')
>  			return 1;
>  	}
> 

  reply	other threads:[~2019-01-31 20:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-31 20:20 [PATCH] xfs_repair: fix incorrect return value in namecheck() Eric Sandeen
2019-01-31 20:40 ` Darrick J. Wong [this message]
2019-01-31 20:47 ` Bill O'Donnell

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=20190131204048.GD5761@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.