On Fri, 11 Apr 2008 04:44:13 +1000, Christoph Hellwig <hch@xxxxxx> wrote:
as with lookup merge what's left of xfs_dir_lookup_int into it, kill
a useless lock roundtrip left over from IRIX and kill a bunch of useless
variables.
Signed-off-by: Christoph Hellwig <hch@xxxxxx>
Index: linux-2.6-xfs/fs/xfs/xfs_rename.c
===================================================================
--- linux-2.6-xfs.orig/fs/xfs/xfs_rename.c 2008-04-09 20:30:08.000000000
+0200
+++ linux-2.6-xfs/fs/xfs/xfs_rename.c 2008-04-10 08:58:50.000000000 +0200
@@ -67,10 +67,6 @@ xfs_rename_unlock4(
}
}
-#ifdef DEBUG
-int xfs_rename_skip, xfs_rename_nskip;
-#endif
-
/*
* The following routine will acquire the locks required for a rename
* operation. The code understands the semantics of renames and will
@@ -92,47 +88,33 @@ xfs_lock_for_rename(
xfs_inode_t **i_tab,/* out: array of inode returned, sorted */
int *num_inodes) /* out: number of inodes in array */
{
- xfs_inode_t *ip2 = NULL;
xfs_inode_t *temp;
- xfs_ino_t inum1, inum2;
+ xfs_ino_t inum2;
int error;
int i, j;
uint lock_mode;
- int diff_dirs = (dp1 != dp2);
- /*
- * First, find out the current inums of the entries so that we
- * can determine the initial locking order. We'll have to
- * sanity check stuff after all the locks have been acquired
- * to see if we still have the right inodes, directories, etc.
- */
- lock_mode = xfs_ilock_map_shared(dp1);
+ *ipp2 = NULL;
+
Isn't it bad form to modify these (passed in params to return values
with - ipp2, i_tab, num_inodes) on error cases?
Barry.
|