xfs
[Top] [All Lists]

Re: [PATCH 2/7] XFS: ASCII case-insensitive support

To: Barry Naujok <bnaujok@xxxxxxx>
Subject: Re: [PATCH 2/7] XFS: ASCII case-insensitive support
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Thu, 3 Apr 2008 18:55:56 -0400
Cc: xfs@xxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx
In-reply-to: <20080402062708.071715758@chook.melbourne.sgi.com>
References: <20080402062508.017738664@chook.melbourne.sgi.com> <20080402062708.071715758@chook.melbourne.sgi.com>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.17 (2007-11-01)
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

>


<Prev in Thread] Current Thread [Next in Thread>