diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-05-16 13:30:15 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:04:03 -0400 |
commit | 515dc3228c568f9df8b634f82b3471e20205ac16 (patch) | |
tree | 989b3d7052338857e9650707c616ea799ba47ebd /fs/btrfs/volumes.c | |
parent | 6af5ac3c1aede574acde5fc477f1a1c876fb568e (diff) |
Btrfs: Use kzalloc on the fs_devices allocation
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r-- | fs/btrfs/volumes.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 3fbf0834e884..333e5269577a 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c | |||
@@ -120,7 +120,7 @@ static int device_list_add(const char *path, | |||
120 | 120 | ||
121 | fs_devices = find_fsid(disk_super->fsid); | 121 | fs_devices = find_fsid(disk_super->fsid); |
122 | if (!fs_devices) { | 122 | if (!fs_devices) { |
123 | fs_devices = kmalloc(sizeof(*fs_devices), GFP_NOFS); | 123 | fs_devices = kzalloc(sizeof(*fs_devices), GFP_NOFS); |
124 | if (!fs_devices) | 124 | if (!fs_devices) |
125 | return -ENOMEM; | 125 | return -ENOMEM; |
126 | INIT_LIST_HEAD(&fs_devices->devices); | 126 | INIT_LIST_HEAD(&fs_devices->devices); |
@@ -129,7 +129,6 @@ static int device_list_add(const char *path, | |||
129 | memcpy(fs_devices->fsid, disk_super->fsid, BTRFS_FSID_SIZE); | 129 | memcpy(fs_devices->fsid, disk_super->fsid, BTRFS_FSID_SIZE); |
130 | fs_devices->latest_devid = devid; | 130 | fs_devices->latest_devid = devid; |
131 | fs_devices->latest_trans = found_transid; | 131 | fs_devices->latest_trans = found_transid; |
132 | fs_devices->num_devices = 0; | ||
133 | device = NULL; | 132 | device = NULL; |
134 | } else { | 133 | } else { |
135 | device = __find_device(&fs_devices->devices, devid, | 134 | device = __find_device(&fs_devices->devices, devid, |