* [PATCH] xfs_repair: fix incorrect return value in namecheck()
@ 2019-01-31 20:20 Eric Sandeen
2019-01-31 20:40 ` Darrick J. Wong
2019-01-31 20:47 ` Bill O'Donnell
0 siblings, 2 replies; 3+ messages in thread
From: Eric Sandeen @ 2019-01-31 20:20 UTC (permalink / raw)
To: linux-xfs
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>
---
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;
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] xfs_repair: fix incorrect return value in namecheck()
2019-01-31 20:20 [PATCH] xfs_repair: fix incorrect return value in namecheck() Eric Sandeen
@ 2019-01-31 20:40 ` Darrick J. Wong
2019-01-31 20:47 ` Bill O'Donnell
1 sibling, 0 replies; 3+ messages in thread
From: Darrick J. Wong @ 2019-01-31 20:40 UTC (permalink / raw)
To: Eric Sandeen; +Cc: linux-xfs
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;
> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xfs_repair: fix incorrect return value in namecheck()
2019-01-31 20:20 [PATCH] xfs_repair: fix incorrect return value in namecheck() Eric Sandeen
2019-01-31 20:40 ` Darrick J. Wong
@ 2019-01-31 20:47 ` Bill O'Donnell
1 sibling, 0 replies; 3+ messages in thread
From: Bill O'Donnell @ 2019-01-31 20:47 UTC (permalink / raw)
To: Eric Sandeen; +Cc: linux-xfs
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>
> ---
Makes sense.
Reviewed-by: Bill O'Donnell <billodo@redhat.com>
>
> 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;
> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-01-31 20:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-31 20:20 [PATCH] xfs_repair: fix incorrect return value in namecheck() Eric Sandeen
2019-01-31 20:40 ` Darrick J. Wong
2019-01-31 20:47 ` Bill O'Donnell
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).