Skip to contentSkip to conversation

btrfs: Remove error messages for failed memory allocations

PATCH Markus Elfring 1 participant 1 message Jun 11, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw
Quoted 2 lines

As there is a dump_stack() done on memory allocation failures, these messages might as well be deleted instead.

* I imagine that an other wording variant can become clearer for the change description.

* I suggest to reconsider the patch subject.

…

Review static int btrfsic_process_superblock(struct btrfsic_state *state, · line 636

Quoted 8 lines

+++ b/fs/btrfs/check-integrity.c

(quoted diff) +0 -1
@@ -632,7 +632,6 @@  static int btrfsic_process_superblock(struct btrfsic_state *state,
 
 	selected_super = kzalloc(sizeof(*selected_super), GFP_NOFS);
 	if (NULL == selected_super) {
-		pr_info("btrfsic: error, kmalloc failed!\n");
 		return -ENOMEM;
 	}

How do you think about to use the following error handling instead?

	if (!selected_super)
		return -ENOMEM;

Regards,
Markus