[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <B015F41A-6489-4EFC-A4EC-305589AC3C97@dilger.ca>
Date: Thu, 1 Oct 2015 00:20:43 -0600
From: Andreas Dilger <adilger@...ger.ca>
To: "Darrick J. Wong" <darrick.wong@...cle.com>
Cc: Theodore Ts'o <tytso@....edu>, linux-ext4@...r.kernel.org
Subject: Re: [PATCH] ext4: don't print warnings on successful MMP read completion
On Sep 30, 2015, at 11:42 AM, Darrick J. Wong <darrick.wong@...cle.com> wrote:
>
> If the MMP block reads without error, don't spam dmesg with warnings.
It is hard to tell from the patch context here, but in the version
of read_mmp_block() I have (v4.3-rc3-55-gdd36d73) the only way to
get to warn_exit: is if there is an error already.
> diff --git a/fs/ext4/mmp.c b/fs/ext4/mmp.c
> index 6eb1a61..7bc0873 100644
> --- a/fs/ext4/mmp.c
> +++ b/fs/ext4/mmp.c
> @@ -104,8 +104,9 @@ static int read_mmp_block(struct super_block *sb, struct buffer_head **bh,
The preceding few lines are as follows, and all of the jumps to
warn_exit before this set ret != 0:
mmp = (struct mmp_struct *)((*bh)->b_data);
if (le32_to_cpu(mmp->mmp_magic) == EXT4_MMP_MAGIC &&
ext4_mmp_csum_verify(sb, mmp))
return 0;
> ret = -EINVAL;
>
> warn_exit:
> - ext4_warning(sb, "Error %d while reading MMP block %llu",
> - ret, mmp_block);
> + if (ret)
> + ext4_warning(sb, "Error %d while reading MMP block %llu",
> + ret, mmp_block);
> return ret;
> }
How does this code get to warn_exit: without setting ret?
Cheers, Andreas
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists