Skip to contentSkip to conversation

AFS: afs_voltypes isn't always required

PATCH New Adrian Bunk 1 participant 1 message Oct 30, 2004 Afs filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 AFS: afs_voltypes isn't always required

afs_voltypes is only used #ifdef __KDEBUG, and even then it doesn't has to be a global symbol.

fs/afs/types.h renamed from fs/afs/types.h.old +0 -2
@@ -26,8 +26,6 @@
 	AFSVL_BACKVOL,			/* backup volume */
 } __attribute__((packed)) afs_voltype_t;
 
-extern const char *afs_voltypes[];
-
 typedef enum {
 	AFS_FTYPE_INVALID	= 0,
 	AFS_FTYPE_FILE		= 1,
fs/afs/volume.c renamed from fs/afs/volume.c.old +3 -1
@@ -24,7 +24,9 @@
 #include "vlclient.h"
 #include "internal.h"
 
-const char *afs_voltypes[] = { "R/W", "R/O", "BAK" };
+#ifdef __KDEBUG
+static const char *afs_voltypes[] = { "R/W", "R/O", "BAK" };
+#endif
 
 #ifdef CONFIG_AFS_FSCACHE
 static fscache_match_val_t afs_volume_cache_match(void *target,