Skip to content

Commit

Permalink
aoe: do not BUG if memory pressure prevented debugfs file creation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
ecashin authored and torvalds committed Sep 11, 2013
1 parent e0ec360 commit fea1b13
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/block/aoe/aoeblk.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ aoedisk_add_debugfs(struct aoedev *d)
void
aoedisk_rm_debugfs(struct aoedev *d)
{
BUG_ON(d->debugfs == NULL);
debugfs_remove(d->debugfs);
d->debugfs = NULL;
}
Expand Down

0 comments on commit fea1b13

Please sign in to comment.