Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1617908

[PATCH 4/5] jbd2: use stable bdev pointer

From Dmitry Monakhov <dmonakhov@openvz.org>
Newsgroups linux.kernel
Subject [PATCH 4/5] jbd2: use stable bdev pointer
Date 2017-04-06 14:10 +0200
Message-ID <tteoG-8jD-17@gated-at.bofh.it> (permalink)
References <tteoF-8jD-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


This prevent us from panic if someone invalidate bh under us.

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
---
 fs/jbd2/revoke.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/jbd2/revoke.c b/fs/jbd2/revoke.c
index f9aefcd..e3b791d 100644
--- a/fs/jbd2/revoke.c
+++ b/fs/jbd2/revoke.c
@@ -459,7 +459,8 @@ int jbd2_journal_cancel_revoke(handle_t *handle, struct journal_head *jh)
 	 * state machine will get very upset later on. */
 	if (need_cancel) {
 		struct buffer_head *bh2;
-		bh2 = __find_get_block(bh->b_bdev, bh->b_blocknr, bh->b_size);
+		bh2 = __find_get_block(journal->j_dev, bh->b_blocknr,
+				       bh->b_size);
 		if (bh2) {
 			if (bh2 != bh)
 				clear_buffer_revoked(bh2);
-- 
2.9.3

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 4/5] jbd2: use stable bdev pointer Dmitry Monakhov <dmonakhov@openvz.org> - 2017-04-06 14:10 +0200

csiph-web