From: Theodore Ts'o <tytso@mit.edu>
To: Matthew Wilcox <willy@linux.intel.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH] ext4: Ensure that inode is non-NULL before calling ext4_error_inode
Date: Wed, 2 Apr 2014 11:32:17 -0400 [thread overview]
Message-ID: <20140402153217.GC6901@thunk.org> (raw)
In-Reply-To: <20140402143630.GB27299@linux.intel.com>
On Wed, Apr 02, 2014 at 10:36:30AM -0400, Matthew Wilcox wrote:
>
> __ext4_handle_dirty_metadata can be called with a NULL inode, but
> ext4_error_inode can't. This is supposed to be a "can't happen" path,
> so we need to find out whether it can legitimately happen or whether
> there's some other bug that is causing this to happen. This prevents
> a NULL pointer reference, so it should be included regardless of what
> the underlying error is.
>
> Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
This was fixed by the following commit which will be shortly
pushed to Linus. Admittedly, I should have done a better job noting
it in the commit description (sorry about that):
http://git.kernel.org/cgit/linux/kernel/git/tytso/ext4.git/commit/?h=dev&id=0edaa0178ea7142691ae9c10baa42b3e6466d047
In my patch I made sure we printed something so there would be better
chance of debugging the problem:
+ if (inode == NULL) {
+ pr_err("EXT4: jbd2_journal_dirty_metadata "
+ "failed: handle type %u started at "
+ "line %u, credits %u/%u, errcode %d",
+ handle->h_type,
+ handle->h_line_no,
+ handle->h_requested_credits,
+ handle->h_buffer_credits, err);
+ return err;
+ }
It turns out this case does happen if we are journalling fs-level
metadata, such as block group descriptor.
- Ted
next prev parent reply other threads:[~2014-04-02 15:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-02 14:36 [PATCH] ext4: Ensure that inode is non-NULL before calling ext4_error_inode Matthew Wilcox
2014-04-02 15:32 ` Theodore Ts'o [this message]
2014-04-02 16:47 ` Jan Kara
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=20140402153217.GC6901@thunk.org \
--to=tytso@mit.edu \
--cc=linux-ext4@vger.kernel.org \
--cc=willy@linux.intel.com \
/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;
as well as URLs for NNTP newsgroup(s).