Skip to content

Commit

Permalink
fs: befs: replace befs_bread by sb_bread
Browse files Browse the repository at this point in the history
Since befs_bread merely calls sb_bread, replace it by sb_bread.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Salah Triki <[email protected]>
Acked-by: Luis de Bethencourt <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
  • Loading branch information
salah-triki authored and luisbg committed Oct 8, 2016
1 parent f0f2536 commit f7f6754
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 30 deletions.
6 changes: 3 additions & 3 deletions fs/befs/datastream.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ befs_find_brun_indirect(struct super_block *sb,

/* Examine blocks of the indirect run one at a time */
for (i = 0; i < indirect.len; i++) {
indirblock = befs_bread(sb, indirblockno + i);
indirblock = sb_bread(sb, indirblockno + i);
if (indirblock == NULL) {
befs_debug(sb, "---> %s failed to read "
"disk block %lu from the indirect brun",
Expand Down Expand Up @@ -471,7 +471,7 @@ befs_find_brun_dblindirect(struct super_block *sb,
}

dbl_indir_block =
befs_bread(sb, iaddr2blockno(sb, &data->double_indirect) +
sb_bread(sb, iaddr2blockno(sb, &data->double_indirect) +
dbl_which_block);
if (dbl_indir_block == NULL) {
befs_error(sb, "%s couldn't read the "
Expand Down Expand Up @@ -499,7 +499,7 @@ befs_find_brun_dblindirect(struct super_block *sb,
}

indir_block =
befs_bread(sb, iaddr2blockno(sb, &indir_run) + which_block);
sb_bread(sb, iaddr2blockno(sb, &indir_run) + which_block);
if (indir_block == NULL) {
befs_error(sb, "%s couldn't read the indirect block "
"at blockno %lu", __func__, (unsigned long)
Expand Down
24 changes: 0 additions & 24 deletions fs/befs/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,27 +59,3 @@ befs_bread_iaddr(struct super_block *sb, befs_inode_addr iaddr)
befs_debug(sb, "<--- %s ERROR", __func__);
return NULL;
}

struct buffer_head *
befs_bread(struct super_block *sb, befs_blocknr_t block)
{
struct buffer_head *bh;

befs_debug(sb, "---> Enter %s %lu", __func__, (unsigned long)block);

bh = sb_bread(sb, block);

if (bh == NULL) {
befs_error(sb, "Failed to read block %lu",
(unsigned long)block);
goto error;
}

befs_debug(sb, "<--- %s", __func__);

return bh;

error:
befs_debug(sb, "<--- %s ERROR", __func__);
return NULL;
}
2 changes: 0 additions & 2 deletions fs/befs/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@
struct buffer_head *befs_bread_iaddr(struct super_block *sb,
befs_inode_addr iaddr);

struct buffer_head *befs_bread(struct super_block *sb, befs_blocknr_t block);

2 changes: 1 addition & 1 deletion fs/befs/linuxvfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ static struct inode *befs_iget(struct super_block *sb, unsigned long ino)
befs_ino->i_inode_num.allocation_group,
befs_ino->i_inode_num.start, befs_ino->i_inode_num.len);

bh = befs_bread(sb, inode->i_ino);
bh = sb_bread(sb, inode->i_ino);
if (!bh) {
befs_error(sb, "unable to read inode block - "
"inode = %lu", inode->i_ino);
Expand Down

0 comments on commit f7f6754

Please sign in to comment.