GIT: unionfs2-2.6.27.y: cleanup: remove unnecessary macro used in only one place

Erez Zadok ezk at fsl.cs.sunysb.edu
Thu Aug 12 23:16:16 EDT 2010


commit 4bb766b075eb376f9ba61769f35933e208de0964
Author: Erez Zadok <ezk at bigvaio.(none)>
Date:   Fri May 18 01:56:08 2007 -0400

    cleanup: remove unnecessary macro used in only one place
    
    Remove the UNIONFS_TMPNAM_LEN macro and just use the actual length of the
    string file name in question, which is more efficient (and correct).

diff --git a/fs/unionfs/commonfops.c b/fs/unionfs/commonfops.c
index 519dbf0..62e9923 100644
--- a/fs/unionfs/commonfops.c
+++ b/fs/unionfs/commonfops.c
@@ -63,7 +63,7 @@ retry:
 		       dentry->d_name.name, name);
 
 		tmp_dentry = lookup_one_len(name, hidden_dentry->d_parent,
-					    UNIONFS_TMPNAM_LEN);
+					    nlen);
 		if (IS_ERR(tmp_dentry)) {
 			err = PTR_ERR(tmp_dentry);
 			goto out;
diff --git a/fs/unionfs/union.h b/fs/unionfs/union.h
index 7a4f627..be5e61b 100644
--- a/fs/unionfs/union.h
+++ b/fs/unionfs/union.h
@@ -54,9 +54,6 @@
 /* unionfs root inode number */
 #define UNIONFS_ROOT_INO     1
 
-/* number of characters while generating unique temporary file names */
-#define	UNIONFS_TMPNAM_LEN	12
-
 /* number of times we try to get a unique temporary file name */
 #define GET_TMPNAM_MAX_RETRY	5
 


More information about the unionfs-cvs mailing list