[linux-cifs-client] [PATCH] [CIFS] cast destination qstr->name in memcpy called from cifs_ci_compare

Jeff Layton jlayton at redhat.com
Tue Apr 29 20:02:53 GMT 2008


On Tue, 29 Apr 2008 15:55:21 -0400
Christoph Hellwig <hch at infradead.org> wrote:

> On Tue, Apr 29, 2008 at 03:51:02PM -0400, Jeff Layton wrote:
> > One of the ACL handling patches removed an explict cast in a memcpy
> > call in cifs_ci_compare. This is causing the following compile time
> > warning:
> > 
> >     fs/cifs/dir.c: In function ???cifs_ci_compare???:
> >     fs/cifs/dir.c:593: warning: passing argument 1 of ???memcpy???
> >     discards qualifiers from pointer target type
> > 
> > I don't see any reason for the removal, and putting it back silences
> > this warning.
> 
> The warning there is because this is wrong.  CIFS should be doing
> something similar to fs/ntfs/namei.c:ntfs_lookup() for handling of
> CI filename.  We'll soon get a routine lifted from that one in generic
> code as part of the XFS CI support for Samba that should be used by
> cifs aswell.
> 

Ok. For the record, I pretty much knew this was an ugly thing, but I
was rather sick of seeing the warning. :-)

It sounds reasonable to drop this if there is a plan to fix it the
right way in the future...

-- 
Jeff Layton <jlayton at redhat.com>


More information about the linux-cifs-client mailing list