From patchwork Tue May 8 18:04:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Fasheh X-Patchwork-Id: 10387179 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BD92E6037F for ; Tue, 8 May 2018 18:27:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B84BA287A4 for ; Tue, 8 May 2018 18:27:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ACBB6287C0; Tue, 8 May 2018 18:27:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 62F33287A4 for ; Tue, 8 May 2018 18:27:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755704AbeEHSFx (ORCPT ); Tue, 8 May 2018 14:05:53 -0400 Received: from mx2.suse.de ([195.135.220.15]:54041 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755687AbeEHSFv (ORCPT ); Tue, 8 May 2018 14:05:51 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id B3A52AD4A; Tue, 8 May 2018 18:05:49 +0000 (UTC) From: Mark Fasheh To: linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-btrfs@vger.kernel.org, Mark Fasheh Subject: [PATCH 43/76] fs/jbd2: Use inode_sb() helper instead of inode->i_sb Date: Tue, 8 May 2018 11:04:03 -0700 Message-Id: <20180508180436.716-44-mfasheh@suse.de> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180508180436.716-1-mfasheh@suse.de> References: <20180508180436.716-1-mfasheh@suse.de> Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Mark Fasheh --- fs/jbd2/journal.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index 3fbf48ec2188..e1834a69cd41 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c @@ -1262,12 +1262,16 @@ journal_t *jbd2_journal_init_inode(struct inode *inode) } jbd_debug(1, "JBD2: inode %s/%ld, size %lld, bits %d, blksize %ld\n", - inode->i_sb->s_id, inode->i_ino, (long long) inode->i_size, - inode->i_sb->s_blocksize_bits, inode->i_sb->s_blocksize); - - journal = journal_init_common(inode->i_sb->s_bdev, inode->i_sb->s_bdev, - blocknr, inode->i_size >> inode->i_sb->s_blocksize_bits, - inode->i_sb->s_blocksize); + inode_sb(inode)->s_id, inode->i_ino, + (long long) inode->i_size, + inode_sb(inode)->s_blocksize_bits, + inode_sb(inode)->s_blocksize); + + journal = journal_init_common(inode_sb(inode)->s_bdev, + inode_sb(inode)->s_bdev, + blocknr, + inode->i_size >> inode_sb(inode)->s_blocksize_bits, + inode_sb(inode)->s_blocksize); if (!journal) return NULL; @@ -2233,7 +2237,7 @@ void jbd2_journal_ack_err(journal_t *journal) int jbd2_journal_blocks_per_page(struct inode *inode) { - return 1 << (PAGE_SHIFT - inode->i_sb->s_blocksize_bits); + return 1 << (PAGE_SHIFT - inode_sb(inode)->s_blocksize_bits); } /*