aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSalah Triki <salah.triki@gmail.com>2016-07-23 08:36:42 -0400
committerLuis de Bethencourt <luisbg@osg.samsung.com>2016-10-08 05:01:12 -0400
commitf7f675406be6eb3736a8690217d7b41d60f6a1aa (patch)
tree705249484cabc9add57f29ca27c92627d8af0001
parentf0f2536fe36671028209e0bd15a2940f2b61cdb5 (diff)
fs: befs: replace befs_bread by sb_bread
Since befs_bread merely calls sb_bread, replace it by sb_bread. Link: http://lkml.kernel.org/r/1466800258-4542-1-git-send-email-salah.triki@gmail.com Signed-off-by: Salah Triki <salah.triki@gmail.com> Acked-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--fs/befs/datastream.c6
-rw-r--r--fs/befs/io.c24
-rw-r--r--fs/befs/io.h2
-rw-r--r--fs/befs/linuxvfs.c2
4 files changed, 4 insertions, 30 deletions
diff --git a/fs/befs/datastream.c b/fs/befs/datastream.c
index af1bc19b7c85..26cc417cbdce 100644
--- a/fs/befs/datastream.c
+++ b/fs/befs/datastream.c
@@ -326,7 +326,7 @@ befs_find_brun_indirect(struct super_block *sb,
326 326
327 /* Examine blocks of the indirect run one at a time */ 327 /* Examine blocks of the indirect run one at a time */
328 for (i = 0; i < indirect.len; i++) { 328 for (i = 0; i < indirect.len; i++) {
329 indirblock = befs_bread(sb, indirblockno + i); 329 indirblock = sb_bread(sb, indirblockno + i);
330 if (indirblock == NULL) { 330 if (indirblock == NULL) {
331 befs_debug(sb, "---> %s failed to read " 331 befs_debug(sb, "---> %s failed to read "
332 "disk block %lu from the indirect brun", 332 "disk block %lu from the indirect brun",
@@ -471,7 +471,7 @@ befs_find_brun_dblindirect(struct super_block *sb,
471 } 471 }
472 472
473 dbl_indir_block = 473 dbl_indir_block =
474 befs_bread(sb, iaddr2blockno(sb, &data->double_indirect) + 474 sb_bread(sb, iaddr2blockno(sb, &data->double_indirect) +
475 dbl_which_block); 475 dbl_which_block);
476 if (dbl_indir_block == NULL) { 476 if (dbl_indir_block == NULL) {
477 befs_error(sb, "%s couldn't read the " 477 befs_error(sb, "%s couldn't read the "
@@ -499,7 +499,7 @@ befs_find_brun_dblindirect(struct super_block *sb,
499 } 499 }
500 500
501 indir_block = 501 indir_block =
502 befs_bread(sb, iaddr2blockno(sb, &indir_run) + which_block); 502 sb_bread(sb, iaddr2blockno(sb, &indir_run) + which_block);
503 if (indir_block == NULL) { 503 if (indir_block == NULL) {
504 befs_error(sb, "%s couldn't read the indirect block " 504 befs_error(sb, "%s couldn't read the indirect block "
505 "at blockno %lu", __func__, (unsigned long) 505 "at blockno %lu", __func__, (unsigned long)
diff --git a/fs/befs/io.c b/fs/befs/io.c
index 523c8af2d770..4223b779fcc4 100644
--- a/fs/befs/io.c
+++ b/fs/befs/io.c
@@ -59,27 +59,3 @@ befs_bread_iaddr(struct super_block *sb, befs_inode_addr iaddr)
59 befs_debug(sb, "<--- %s ERROR", __func__); 59 befs_debug(sb, "<--- %s ERROR", __func__);
60 return NULL; 60 return NULL;
61} 61}
62
63struct buffer_head *
64befs_bread(struct super_block *sb, befs_blocknr_t block)
65{
66 struct buffer_head *bh;
67
68 befs_debug(sb, "---> Enter %s %lu", __func__, (unsigned long)block);
69
70 bh = sb_bread(sb, block);
71
72 if (bh == NULL) {
73 befs_error(sb, "Failed to read block %lu",
74 (unsigned long)block);
75 goto error;
76 }
77
78 befs_debug(sb, "<--- %s", __func__);
79
80 return bh;
81
82 error:
83 befs_debug(sb, "<--- %s ERROR", __func__);
84 return NULL;
85}
diff --git a/fs/befs/io.h b/fs/befs/io.h
index 9b78266b6aa5..78d7bc6e60de 100644
--- a/fs/befs/io.h
+++ b/fs/befs/io.h
@@ -5,5 +5,3 @@
5struct buffer_head *befs_bread_iaddr(struct super_block *sb, 5struct buffer_head *befs_bread_iaddr(struct super_block *sb,
6 befs_inode_addr iaddr); 6 befs_inode_addr iaddr);
7 7
8struct buffer_head *befs_bread(struct super_block *sb, befs_blocknr_t block);
9
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index 453bb68da219..619b998e9a1e 100644
--- a/fs/befs/linuxvfs.c
+++ b/fs/befs/linuxvfs.c
@@ -318,7 +318,7 @@ static struct inode *befs_iget(struct super_block *sb, unsigned long ino)
318 befs_ino->i_inode_num.allocation_group, 318 befs_ino->i_inode_num.allocation_group,
319 befs_ino->i_inode_num.start, befs_ino->i_inode_num.len); 319 befs_ino->i_inode_num.start, befs_ino->i_inode_num.len);
320 320
321 bh = befs_bread(sb, inode->i_ino); 321 bh = sb_bread(sb, inode->i_ino);
322 if (!bh) { 322 if (!bh) {
323 befs_error(sb, "unable to read inode block - " 323 befs_error(sb, "unable to read inode block - "
324 "inode = %lu", inode->i_ino); 324 "inode = %lu", inode->i_ino);