From: Erez Zadok Date: Fri, 18 May 2007 05:56:08 +0000 (-0400) Subject: cleanup: remove unnecessary macro used in only one place X-Git-Tag: unionfs-2.1.1~126 X-Git-Url: https://git.fsl.cs.stonybrook.edu/?a=commitdiff_plain;h=12cf78b4b1cee22404bb83f84a41f2eb77a3ee23;p=unionfs-2.6.26.y.git 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 519dbf0377d..62e992309bb 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 7a4f6278695..be5e61b6836 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