Skip to contentSkip to conversation

change d_add_ci argument ordering

PATCH In review Christoph Hellwig 2 participants 3 messages Aug 7, 2008 – Aug 8, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 change d_add_ci argument ordering

As pointed out during review d_add_ci argument order should match d_add, so switch the dentry and inode arguments.

#1 lore raw
Quoted 2 lines · Christoph Hellwig

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:

fs/dcache.c +1 -1
Index: linux-2.6/fs/dcache.c
===================================================================
@@ -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;
fs/xfs/linux-2.6/xfs_iops.c +1 -1
Index: linux-2.6/fs/xfs/linux-2.6/xfs_iops.c
===================================================================
@@ -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;
 }
include/linux/dcache.h +1 -1
Index: linux-2.6/include/linux/dcache.h
===================================================================
@@ -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 *);
#2 lore raw
Quoted 3 lines · Christoph Hellwig
Quoted 2 lines · Christoph Hellwig

As pointed out during review d_add_ci argument order should match d_add, so switch the dentry and inode arguments.

Bugger, must have missed that comment. Patch looks good.

Quoted 53 lines

And actually attaching the patch would be highly useful, so here it is:

Index: linux-2.6/fs/dcache.c
===================================================================

fs/dcache.c +1 -1
@@ -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

fs/dcache.c +1 -1
@@ -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

fs/dcache.c +1 -1
@@ -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 *);
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html