From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from aserp2130.oracle.com ([141.146.126.79]:56740 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727200AbfAaUk6 (ORCPT ); Thu, 31 Jan 2019 15:40:58 -0500 Date: Thu, 31 Jan 2019 12:40:48 -0800 From: "Darrick J. Wong" Subject: Re: [PATCH] xfs_repair: fix incorrect return value in namecheck() Message-ID: <20190131204048.GD5761@magnolia> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-xfs-owner@vger.kernel.org List-ID: List-Id: xfs 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 > Signed-off-by: Eric Sandeen Looks ok, Reviewed-by: Darrick J. Wong (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; > } >