From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 2/7] XFS: ASCII case-insensitive support Date: Thu, 3 Apr 2008 18:55:56 -0400 Message-ID: <20080403225556.GB448@infradead.org> References: <20080402062508.017738664@chook.melbourne.sgi.com> <20080402062708.071715758@chook.melbourne.sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: xfs@oss.sgi.com, linux-fsdevel@vger.kernel.org To: Barry Naujok Return-path: Received: from bombadil.infradead.org ([18.85.46.34]:58123 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751114AbYDCWz5 (ORCPT ); Thu, 3 Apr 2008 18:55:57 -0400 Content-Disposition: inline In-Reply-To: <20080402062708.071715758@chook.melbourne.sgi.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, Apr 02, 2008 at 04:25:10PM +1000, Barry Naujok wrote: > + struct qstr *a, > + struct qstr *b) > +{ > + int result = xfs_dir_compname(XFS_I(dir->d_inode), a->name, a->len, > + b->name, b->len) == XFS_CMP_DIFFERENT; > + /* > + * result == 0 if a match is found, and if so, copy the name in "b" > + * to "a" to cope with negative dentries getting the correct name. > + */ > + if (result == 0) > + memcpy((unsigned char *)a->name, b->name, a->len); > + return result; qstr->name is marked const for a reason, please don't overwrite it after it's creation. > +struct dentry_operations xfs_ci_dentry_operations = > +{ struct dentry_operations xfs_ci_dentry_operations = { > +static xfs_dahash_t > +xfs_ascii_ci_hashname( is the use of STATIC now officially phased out for XFS? > + ((sbp)->sb_versionnum & XFS_SB_VERSION_OLDCIBIT); no need for the braces around sbp >