mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ed Cashin <ecashin@coraid.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, ecashin@coraid.com
Subject: [PATCH 1/2] aoe: do not BUG if memory pressure prevented debugfs file creation
Date: Wed, 28 Aug 2013 11:41:21 -0400	[thread overview]
Message-ID: <2e1689e4fd60ee1b3867b18f331e4ba3046949f6.1377185392.git.ecashin@coraid.com> (raw)
In-Reply-To: <cover.1377185392.git.ecashin@coraid.com>

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>
---
 drivers/block/aoe/aoeblk.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c
index d63dcf0..dd73e1f 100644
--- a/drivers/block/aoe/aoeblk.c
+++ b/drivers/block/aoe/aoeblk.c
@@ -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;
 }
-- 
1.7.1


  reply	other threads:[~2013-08-28 15:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-28 15:41 [PATCH 0/2] aoe: remove too-strict BUG from aoedev teardown and update udev example Ed Cashin
2013-08-28 15:41 ` Ed Cashin [this message]
2013-08-28 15:43 ` [PATCH 2/2] aoe: remove do-nothing NAME="%k" term from example udev rules Ed Cashin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2e1689e4fd60ee1b3867b18f331e4ba3046949f6.1377185392.git.ecashin@coraid.com \
    --to=ecashin@coraid.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®