From 798f5c281bc7cef6e5873e9ddcfbc95424cd56b0 Mon Sep 17 00:00:00 2001 From: Erez Zadok Date: Fri, 18 May 2007 01:56:08 -0400 Subject: [PATCH] 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). --- fs/unionfs/commonfops.c | 2 +- fs/unionfs/union.h | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) 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 -- 2.43.0