@@ -42,7 +42,7 @@ static int efs_readdir(struct file *file, struct dir_context *ctx)
struct buffer_head *bh;
/* read the dir block */
- bh = sb_bread(inode->i_sb, efs_bmap(inode, block));
+ bh = sb_bread(inode_sb(inode), efs_bmap(inode, block));
if (!bh) {
pr_err("%s(): failed to read dir block %d\n",
@@ -30,7 +30,7 @@ int efs_get_block(struct inode *inode, sector_t iblock,
}
phys = efs_map_block(inode, iblock);
if (phys)
- map_bh(bh_result, inode->i_sb, phys);
+ map_bh(bh_result, inode_sb(inode), phys);
return 0;
}
@@ -87,7 +87,7 @@ struct inode *efs_iget(struct super_block *super, unsigned long ino)
(EFS_BLOCKSIZE / sizeof(struct efs_dinode))) *
sizeof(struct efs_dinode);
- bh = sb_bread(inode->i_sb, block);
+ bh = sb_bread(inode_sb(inode), block);
if (!bh) {
pr_warn("%s() failed at block %d\n", __func__, block);
goto read_inode_error;
@@ -196,7 +196,7 @@ efs_extent_check(efs_extent *ptr, efs_block_t block, struct efs_sb_info *sb) {
}
efs_block_t efs_map_block(struct inode *inode, efs_block_t block) {
- struct efs_sb_info *sb = SUPER_INFO(inode->i_sb);
+ struct efs_sb_info *sb = SUPER_INFO(inode_sb(inode));
struct efs_inode_info *in = INODE_INFO(inode);
struct buffer_head *bh = NULL;
@@ -275,7 +275,7 @@ efs_block_t efs_map_block(struct inode *inode, efs_block_t block) {
if (first || lastblock != iblock) {
if (bh) brelse(bh);
- bh = sb_bread(inode->i_sb, iblock);
+ bh = sb_bread(inode_sb(inode), iblock);
if (!bh) {
pr_err("%s() failed at block %d\n",
__func__, iblock);
@@ -30,7 +30,7 @@ static efs_ino_t efs_find_entry(struct inode *inode, const char *name, int len)
for(block = 0; block < inode->i_blocks; block++) {
- bh = sb_bread(inode->i_sb, efs_bmap(inode, block));
+ bh = sb_bread(inode_sb(inode), efs_bmap(inode, block));
if (!bh) {
pr_err("%s(): failed to read dir block %d\n",
__func__, block);
@@ -69,7 +69,7 @@ struct dentry *efs_lookup(struct inode *dir, struct dentry *dentry, unsigned int
inodenum = efs_find_entry(dir, dentry->d_name.name, dentry->d_name.len);
if (inodenum)
- inode = efs_iget(dir->i_sb, inodenum);
+ inode = efs_iget(inode_sb(dir), inodenum);
return d_splice_alias(inode, dentry);
}
@@ -26,13 +26,13 @@ static int efs_symlink_readpage(struct file *file, struct page *page)
/* read first 512 bytes of link target */
err = -EIO;
- bh = sb_bread(inode->i_sb, efs_bmap(inode, 0));
+ bh = sb_bread(inode_sb(inode), efs_bmap(inode, 0));
if (!bh)
goto fail;
memcpy(link, bh->b_data, (size > EFS_BLOCKSIZE) ? EFS_BLOCKSIZE : size);
brelse(bh);
if (size > EFS_BLOCKSIZE) {
- bh = sb_bread(inode->i_sb, efs_bmap(inode, 1));
+ bh = sb_bread(inode_sb(inode), efs_bmap(inode, 1));
if (!bh)
goto fail;
memcpy(link + EFS_BLOCKSIZE, bh->b_data, size - EFS_BLOCKSIZE);
Signed-off-by: Mark Fasheh <mfasheh@suse.de> --- fs/efs/dir.c | 2 +- fs/efs/file.c | 2 +- fs/efs/inode.c | 6 +++--- fs/efs/namei.c | 4 ++-- fs/efs/symlink.c | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-)