linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Liu Song via Linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net>
To: jaegeuk@kernel.org, yuchao0@huawei.com
Cc: liu.song11@zte.com.cn, linux-kernel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net
Subject: [f2fs-dev] [PATCH] f2fs: use multiplication instead of division in sanity_check_raw_super
Date: Mon,  1 Jul 2019 21:38:41 +0800	[thread overview]
Message-ID: <20190701133841.3201-1-fishland@aliyun.com> (raw)

From: Liu Song <liu.song11@zte.com.cn>

Use multiplication instead of division and be more
consistent with f2fs_msg output information.

Signed-off-by: Liu Song <liu.song11@zte.com.cn>
---
 fs/f2fs/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index af58b2cc21b8..eba4c0f9c347 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -2489,7 +2489,7 @@ static int sanity_check_raw_super(struct f2fs_sb_info *sbi,
 		return 1;
 	}
 
-	if ((segment_count / segs_per_sec) < total_sections) {
+	if (segment_count < (segs_per_sec * total_sections)) {
 		f2fs_msg(sb, KERN_INFO,
 			"Small segment_count (%u < %u * %u)",
 			segment_count, segs_per_sec, total_sections);
-- 
2.20.1



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

             reply	other threads:[~2019-07-01 13:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-01 13:38 Liu Song via Linux-f2fs-devel [this message]
2019-07-01 14:37 ` [f2fs-dev] [PATCH] f2fs: use multiplication instead of division in sanity_check_raw_super Chao Yu
2019-07-02 13:32   ` fishland via Linux-f2fs-devel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190701133841.3201-1-fishland@aliyun.com \
    --to=linux-f2fs-devel@lists.sourceforge.net \
    --cc=fishland@aliyun.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liu.song11@zte.com.cn \
    --cc=yuchao0@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).