X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fafs%2Fvolume.c;h=768c6dbd323ac625277d478086a98f4585a6ae88;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=4ebdb2d50b769455d2086e934dc4bb4859de7e72;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/fs/afs/volume.c b/fs/afs/volume.c index 4ebdb2d50..768c6dbd3 100644 --- a/fs/afs/volume.c +++ b/fs/afs/volume.c @@ -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;