lkml.org 
[lkml]   [2018]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 43/76] fs/jbd2: Use inode_sb() helper instead of inode->i_sb
Date
Signed-off-by: Mark Fasheh <mfasheh@suse.de>
---
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);
}

/*
--
2.15.1
\
 
 \ /
  Last update: 2018-05-08 20:29    [W:0.296 / U:7.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site