fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / fs / afs / volume.c
index 4ebdb2d..768c6db 100644 (file)
@@ -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 AFS_CACHING_SUPPORT
 static cachefs_match_val_t afs_volume_cache_match(void *target,
@@ -184,11 +186,10 @@ int afs_volume_lookup(const char *name, struct afs_cell *cell, int rwpath,
        _debug("creating new volume record");
 
        ret = -ENOMEM;
-       volume = kmalloc(sizeof(struct afs_volume), GFP_KERNEL);
+       volume = kzalloc(sizeof(struct afs_volume), GFP_KERNEL);
        if (!volume)
                goto error_up;
 
-       memset(volume, 0, sizeof(struct afs_volume));
        atomic_set(&volume->usage, 1);
        volume->type            = type;
        volume->type_force      = force;