|
@@ -1619,17 +1619,13 @@ static int o2hb_map_slot_data(struct o2hb_region *reg)
|
|
struct o2hb_disk_slot *slot;
|
|
struct o2hb_disk_slot *slot;
|
|
|
|
|
|
reg->hr_tmp_block = kmalloc(reg->hr_block_bytes, GFP_KERNEL);
|
|
reg->hr_tmp_block = kmalloc(reg->hr_block_bytes, GFP_KERNEL);
|
|
- if (reg->hr_tmp_block == NULL) {
|
|
|
|
- mlog_errno(-ENOMEM);
|
|
|
|
|
|
+ if (reg->hr_tmp_block == NULL)
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
- }
|
|
|
|
|
|
|
|
reg->hr_slots = kcalloc(reg->hr_blocks,
|
|
reg->hr_slots = kcalloc(reg->hr_blocks,
|
|
sizeof(struct o2hb_disk_slot), GFP_KERNEL);
|
|
sizeof(struct o2hb_disk_slot), GFP_KERNEL);
|
|
- if (reg->hr_slots == NULL) {
|
|
|
|
- mlog_errno(-ENOMEM);
|
|
|
|
|
|
+ if (reg->hr_slots == NULL)
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
- }
|
|
|
|
|
|
|
|
for(i = 0; i < reg->hr_blocks; i++) {
|
|
for(i = 0; i < reg->hr_blocks; i++) {
|
|
slot = ®->hr_slots[i];
|
|
slot = ®->hr_slots[i];
|
|
@@ -1645,17 +1641,13 @@ static int o2hb_map_slot_data(struct o2hb_region *reg)
|
|
|
|
|
|
reg->hr_slot_data = kcalloc(reg->hr_num_pages, sizeof(struct page *),
|
|
reg->hr_slot_data = kcalloc(reg->hr_num_pages, sizeof(struct page *),
|
|
GFP_KERNEL);
|
|
GFP_KERNEL);
|
|
- if (!reg->hr_slot_data) {
|
|
|
|
- mlog_errno(-ENOMEM);
|
|
|
|
|
|
+ if (!reg->hr_slot_data)
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
- }
|
|
|
|
|
|
|
|
for(i = 0; i < reg->hr_num_pages; i++) {
|
|
for(i = 0; i < reg->hr_num_pages; i++) {
|
|
page = alloc_page(GFP_KERNEL);
|
|
page = alloc_page(GFP_KERNEL);
|
|
- if (!page) {
|
|
|
|
- mlog_errno(-ENOMEM);
|
|
|
|
|
|
+ if (!page)
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
- }
|
|
|
|
|
|
|
|
reg->hr_slot_data[i] = page;
|
|
reg->hr_slot_data[i] = page;
|
|
|
|
|
|
@@ -1687,10 +1679,8 @@ static int o2hb_populate_slot_data(struct o2hb_region *reg)
|
|
struct o2hb_disk_heartbeat_block *hb_block;
|
|
struct o2hb_disk_heartbeat_block *hb_block;
|
|
|
|
|
|
ret = o2hb_read_slots(reg, reg->hr_blocks);
|
|
ret = o2hb_read_slots(reg, reg->hr_blocks);
|
|
- if (ret) {
|
|
|
|
- mlog_errno(ret);
|
|
|
|
|
|
+ if (ret)
|
|
goto out;
|
|
goto out;
|
|
- }
|
|
|
|
|
|
|
|
/* We only want to get an idea of the values initially in each
|
|
/* We only want to get an idea of the values initially in each
|
|
* slot, so we do no verification - o2hb_check_slot will
|
|
* slot, so we do no verification - o2hb_check_slot will
|