diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-08-17 10:43:19 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-08-17 10:43:19 -0700 |
commit | a08797e853e27fedb2468d4fd45459fd62902143 (patch) | |
tree | d6b2aa197ded9d9c4e81ef115540f5c76f1feb25 /fs/ext4/ext4_jbd2.c | |
parent | 215b28a5308f3d332df2ee09ef11fda45d7e4a92 (diff) | |
parent | a361293f5fedea0016a10599f409631a15d47ee7 (diff) | |
download | op-kernel-dev-a08797e853e27fedb2468d4fd45459fd62902143.zip op-kernel-dev-a08797e853e27fedb2468d4fd45459fd62902143.tar.gz |
Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Pull jbd2 bug fixes from Ted Ts'o:
"Two jbd2 bug fixes, one of which is a regression fix"
* tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
jbd2: Fix oops in jbd2_journal_file_inode()
jbd2: Fix use after free after error in jbd2_journal_dirty_metadata()
Diffstat (limited to 'fs/ext4/ext4_jbd2.c')
-rw-r--r-- | fs/ext4/ext4_jbd2.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ext4/ext4_jbd2.c b/fs/ext4/ext4_jbd2.c index 72a3600..17ac112 100644 --- a/fs/ext4/ext4_jbd2.c +++ b/fs/ext4/ext4_jbd2.c @@ -255,10 +255,10 @@ int __ext4_handle_dirty_metadata(const char *where, unsigned int line, set_buffer_prio(bh); if (ext4_handle_valid(handle)) { err = jbd2_journal_dirty_metadata(handle, bh); - if (err) { - /* Errors can only happen if there is a bug */ - handle->h_err = err; - __ext4_journal_stop(where, line, handle); + /* Errors can only happen if there is a bug */ + if (WARN_ON_ONCE(err)) { + ext4_journal_abort_handle(where, line, __func__, bh, + handle, err); } } else { if (inode) |