Skip to content

Commit 795405c

Browse files
author
Andreas Gruenbacher
committed
gfs2: Remove unnecessary gfs2_meta_check_ii argument
The type argument of gfs2_meta_check_ii() is always set to "magic number", so remove that argument and hardcode the string in gfs2_meta_check_ii(). Change the string to "bad magic number" to emphasize that the problem is the incorrect magic number. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
1 parent b204b1b commit 795405c

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

fs/gfs2/util.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -488,16 +488,16 @@ void gfs2_consist_rgrpd_i(struct gfs2_rgrpd *rgd,
488488
*/
489489

490490
int gfs2_meta_check_ii(struct gfs2_sbd *sdp, struct buffer_head *bh,
491-
const char *type, const char *function, char *file,
491+
const char *function, char *file,
492492
unsigned int line)
493493
{
494494
int me;
495495

496496
gfs2_lm(sdp,
497497
"fatal: invalid metadata block - "
498-
"bh = %llu (%s), "
498+
"bh = %llu (bad magic number), "
499499
"function = %s, file = %s, line = %u\n",
500-
(unsigned long long)bh->b_blocknr, type,
500+
(unsigned long long)bh->b_blocknr,
501501
function, file, line);
502502
me = gfs2_withdraw(sdp);
503503
return (me) ? -1 : -2;

fs/gfs2/util.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ gfs2_consist_rgrpd_i((rgd), __func__, __FILE__, __LINE__)
9292

9393

9494
int gfs2_meta_check_ii(struct gfs2_sbd *sdp, struct buffer_head *bh,
95-
const char *type, const char *function,
95+
const char *function,
9696
char *file, unsigned int line);
9797

9898
static inline int gfs2_meta_check(struct gfs2_sbd *sdp,
@@ -123,7 +123,7 @@ static inline int gfs2_metatype_check_i(struct gfs2_sbd *sdp,
123123
u32 magic = be32_to_cpu(mh->mh_magic);
124124
u16 t = be32_to_cpu(mh->mh_type);
125125
if (unlikely(magic != GFS2_MAGIC))
126-
return gfs2_meta_check_ii(sdp, bh, "magic number", function,
126+
return gfs2_meta_check_ii(sdp, bh, function,
127127
file, line);
128128
if (unlikely(t != type))
129129
return gfs2_metatype_check_ii(sdp, bh, type, t, function,

0 commit comments

Comments
 (0)