cleanup: remove unnecessary macro used in only one place
authorErez Zadok <ezk@bigvaio.(none)>
Fri, 18 May 2007 05:56:08 +0000 (01:56 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Tue, 11 Nov 2014 02:32:37 +0000 (21:32 -0500)
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).

fs/unionfs/commonfops.c
fs/unionfs/union.h

index 519dbf0377d66d27860f0434b0579109ad4745e2..62e992309bb0004f7babc85c9196c4a712d150d2 100644 (file)
@@ -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;
index 7a4f62786955f9cd51ec8ad9f93267543631d856..be5e61b683668b3e2997aa47e90152aecea7a6ff 100644 (file)
@@ -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