Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756066AbdDFMDZ (ORCPT ); Thu, 6 Apr 2017 08:03:25 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:36420 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755757AbdDFMC7 (ORCPT ); Thu, 6 Apr 2017 08:02:59 -0400 From: Dmitry Monakhov To: linux-kernel@vger.kernel.org Cc: darrick.wong@oracle.com, axboe@kernel.dk, tytso@mit.edu, jack@suse.cz, hch@infradead.org, Dmitry Monakhov Subject: [PATCH 4/5] jbd2: use stable bdev pointer Date: Thu, 6 Apr 2017 16:02:48 +0400 Message-Id: <1491480169-1889-5-git-send-email-dmonakhov@openvz.org> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1491480169-1889-1-git-send-email-dmonakhov@openvz.org> References: <1491480169-1889-1-git-send-email-dmonakhov@openvz.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 739 Lines: 23 This prevent us from panic if someone invalidate bh under us. Signed-off-by: Dmitry Monakhov --- 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