From: Christoph Hellwig Subject: Re: [PATCH 1/2] change d_add_ci argument ordering Date: Thu, 7 Aug 2008 23:49:07 +0200 Message-ID: <20080807214907.GB10790@lst.de> References: <20080807214804.GA10790@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: aia21@cantab.net, linux-fsdevel@vger.kernel.org To: viro@zeniv.linux.org.uk Return-path: Received: from verein.lst.de ([213.95.11.210]:54631 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753186AbYHGVtI (ORCPT ); Thu, 7 Aug 2008 17:49:08 -0400 Content-Disposition: inline In-Reply-To: <20080807214804.GA10790@lst.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, Aug 07, 2008 at 11:48:04PM +0200, Christoph Hellwig wrote: > As pointed out during review d_add_ci argument order should match d_add, > so switch the dentry and inode arguments. And actually attaching the patch would be highly useful, so here it is: Signed-off-by: Christoph Hellwig Index: linux-2.6/fs/dcache.c =================================================================== --- linux-2.6.orig/fs/dcache.c 2008-08-04 23:26:41.000000000 -0300 +++ linux-2.6/fs/dcache.c 2008-08-04 23:27:34.000000000 -0300 @@ -1236,7 +1236,7 @@ struct dentry *d_splice_alias(struct ino * If no entry exists with the exact case name, allocate new dentry with * the exact case, and return the spliced entry. */ -struct dentry *d_add_ci(struct inode *inode, struct dentry *dentry, +struct dentry *d_add_ci(struct dentry *dentry, struct inode *inode, struct qstr *name) { int error; Index: linux-2.6/fs/xfs/linux-2.6/xfs_iops.c =================================================================== --- linux-2.6.orig/fs/xfs/linux-2.6/xfs_iops.c 2008-08-04 23:26:22.000000000 -0300 +++ linux-2.6/fs/xfs/linux-2.6/xfs_iops.c 2008-08-04 23:26:37.000000000 -0300 @@ -404,7 +404,7 @@ xfs_vn_ci_lookup( /* else case-insensitive match... */ dname.name = ci_name.name; dname.len = ci_name.len; - dentry = d_add_ci(ip->i_vnode, dentry, &dname); + dentry = d_add_ci(dentry, ip->i_vnode, &dname); kmem_free(ci_name.name); return dentry; } Index: linux-2.6/include/linux/dcache.h =================================================================== --- linux-2.6.orig/include/linux/dcache.h 2008-08-04 23:25:32.000000000 -0300 +++ linux-2.6/include/linux/dcache.h 2008-08-05 17:35:38.000000000 -0300 @@ -230,7 +230,7 @@ extern void d_delete(struct dentry *); extern struct dentry * d_alloc(struct dentry *, const struct qstr *); extern struct dentry * d_alloc_anon(struct inode *); extern struct dentry * d_splice_alias(struct inode *, struct dentry *); -extern struct dentry * d_add_ci(struct inode *, struct dentry *, struct qstr *); +extern struct dentry * d_add_ci(struct dentry *, struct inode *, struct qstr *); extern void shrink_dcache_sb(struct super_block *); extern void shrink_dcache_parent(struct dentry *); extern void shrink_dcache_for_umount(struct super_block *);