Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

aoe: do not BUG if memory pressure prevented debugfs file creation

If the system has trouble allocating memory for the creation of the aoe
debugfs directory or of a file inside it, the debugfs member of an aoedev
can be NULL.

Do not treat a NULL debugfs pointer as a BUG on aoedev shutdown, avoiding
the user impact of an unecessary panic.

Signed-off-by: Ed Cashin <ecashin@coraid.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Ed Cashin and committed by
Linus Torvalds
fea1b139 e0ec3605

-1
-1
drivers/block/aoe/aoeblk.c
··· 215 215 void 216 216 aoedisk_rm_debugfs(struct aoedev *d) 217 217 { 218 - BUG_ON(d->debugfs == NULL); 219 218 debugfs_remove(d->debugfs); 220 219 d->debugfs = NULL; 221 220 }