From: Chris Mason Date: Fri, 16 May 2008 17:30:15 +0000 (-0400) Subject: Btrfs: Use kzalloc on the fs_devices allocation X-Git-Tag: v2.6.29-rc1~27^2~9^2~55^2~56^2~30^2~167 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=515dc3228c568f9df8b634f82b3471e20205ac16;p=linux-2.6-omap-h63xx.git Btrfs: Use kzalloc on the fs_devices allocation Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 3fbf0834e88..333e5269577 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -120,7 +120,7 @@ static int device_list_add(const char *path, fs_devices = find_fsid(disk_super->fsid); if (!fs_devices) { - fs_devices = kmalloc(sizeof(*fs_devices), GFP_NOFS); + fs_devices = kzalloc(sizeof(*fs_devices), GFP_NOFS); if (!fs_devices) return -ENOMEM; INIT_LIST_HEAD(&fs_devices->devices); @@ -129,7 +129,6 @@ static int device_list_add(const char *path, memcpy(fs_devices->fsid, disk_super->fsid, BTRFS_FSID_SIZE); fs_devices->latest_devid = devid; fs_devices->latest_trans = found_transid; - fs_devices->num_devices = 0; device = NULL; } else { device = __find_device(&fs_devices->devices, devid,