Skip to contentSkip to conversation

nfsd: kill unused ENT_HASHMASK definition

PATCH Superseded Shan Wei 2 participants 3 messages Jan 14, 2011 – Jan 18, 2011

Subsystems (2)
lore
Share & tools
lore

Shan Wei

author
#0 lore raw

PATCH 1/1 nfsd: kill unused ENT_HASHMASK definition

This macro definition has not been using since v2.6.12-rc2. So, remove it now.

---
 fs/nfsd/nfs4idmap.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
fs/nfsd/nfs4idmap.c +0 -1
index f0695e8..ce0f6b9 100644
@@ -62,7 +62,6 @@ struct ent {
 
 #define ENT_HASHBITS          8
 #define ENT_HASHMAX           (1 << ENT_HASHBITS)
-#define ENT_HASHMASK          (ENT_HASHMAX - 1)
 
 static void
 ent_init(struct cache_head *cnew, struct cache_head *citm)
Signature · 1 line
1.6.3.3
author
#1 lore raw

PATCH v2 1/1 nfsd: kill unused macro definition

These macros had never been used for several years. So, remove them.

---
V2: add two other unused macros, EXPORT_HASHMASK and FILE_HASH_MASK.

---
 fs/nfsd/export.c    |    1 -
 fs/nfsd/nfs4idmap.c |    1 -
 fs/nfsd/nfs4state.c |    2 +-
 3 files changed, 1 insertions(+), 3 deletions(-)
fs/nfsd/export.c +0 -1
index c0fcb7a..98a964a 100644
@@ -300,7 +300,6 @@ svc_expkey_update(struct svc_expkey *new, struct svc_expkey *old)
 
 #define	EXPORT_HASHBITS		8
 #define	EXPORT_HASHMAX		(1<< EXPORT_HASHBITS)
-#define	EXPORT_HASHMASK		(EXPORT_HASHMAX -1)
 
 static struct cache_head *export_table[EXPORT_HASHMAX];
 
fs/nfsd/nfs4idmap.c +0 -1
index f0695e8..ce0f6b9 100644
@@ -62,7 +62,6 @@ struct ent {
 
 #define ENT_HASHBITS          8
 #define ENT_HASHMAX           (1 << ENT_HASHBITS)
-#define ENT_HASHMASK          (ENT_HASHMAX - 1)
 
 static void
 ent_init(struct cache_head *cnew, struct cache_head *citm)
fs/nfsd/nfs4state.c +1 -1
index fbd18c3..547fbc6 100644
@@ -148,7 +148,7 @@ static struct list_head	ownerstr_hashtbl[OWNER_HASH_SIZE];
 /* hash table for nfs4_file */
 #define FILE_HASH_BITS                   8
 #define FILE_HASH_SIZE                  (1 << FILE_HASH_BITS)
-#define FILE_HASH_MASK                  (FILE_HASH_SIZE - 1)
+
 /* hash table for (open)nfs4_stateid */
 #define STATEID_HASH_BITS              10
 #define STATEID_HASH_SIZE              (1 << STATEID_HASH_BITS)
Signature · 1 line
1.6.3.3
#2 lore raw

Re: [PATCH v2] nfsd: kill unused macro definition

Quoted 2 lines · Shan Wei

These macros had never been used for several years. So, remove them.

Thanks, applying.--b.

Quoted 50 lines

---
V2: add two other unused macros, EXPORT_HASHMASK and FILE_HASH_MASK.

---
 fs/nfsd/export.c    |    1 -
 fs/nfsd/nfs4idmap.c |    1 -
 fs/nfsd/nfs4state.c |    2 +-
 3 files changed, 1 insertions(+), 3 deletions(-)
fs/nfsd/export.c +0 -1
index c0fcb7a..98a964a 100644
@@ -300,7 +300,6 @@ svc_expkey_update(struct svc_expkey *new, struct svc_expkey *old)
 
 #define	EXPORT_HASHBITS		8
 #define	EXPORT_HASHMAX		(1<< EXPORT_HASHBITS)
-#define	EXPORT_HASHMASK		(EXPORT_HASHMAX -1)
 
 static struct cache_head *export_table[EXPORT_HASHMAX];
 
fs/nfsd/nfs4idmap.c +0 -1
index f0695e8..ce0f6b9 100644
@@ -62,7 +62,6 @@ struct ent {
 
 #define ENT_HASHBITS          8
 #define ENT_HASHMAX           (1 << ENT_HASHBITS)
-#define ENT_HASHMASK          (ENT_HASHMAX - 1)
 
 static void
 ent_init(struct cache_head *cnew, struct cache_head *citm)
fs/nfsd/nfs4state.c +1 -1
index fbd18c3..547fbc6 100644
@@ -148,7 +148,7 @@ static struct list_head	ownerstr_hashtbl[OWNER_HASH_SIZE];
 /* hash table for nfs4_file */
 #define FILE_HASH_BITS                   8
 #define FILE_HASH_SIZE                  (1 << FILE_HASH_BITS)
-#define FILE_HASH_MASK                  (FILE_HASH_SIZE - 1)
+
 /* hash table for (open)nfs4_stateid */
 #define STATEID_HASH_BITS              10
 #define STATEID_HASH_SIZE              (1 << STATEID_HASH_BITS)
Signature · 1 line
1.6.3.3