From: Dan Carpenter <dan.carpenter@oracle.com>
To: chao2.yu@samsung.com
Cc: linux-f2fs-devel@lists.sourceforge.net
Subject: Re: f2fs: reorganize f2fs_map_blocks
Date: Mon, 21 Sep 2015 19:25:08 +0300 [thread overview]
Message-ID: <20150921162508.GD5648@mwanda> (raw)
Hello Chao Yu,
The patch bce86a6c64a7: "f2fs: reorganize f2fs_map_blocks" from Sep
11, 2015, leads to the following static checker warning:
fs/f2fs/data.c:653 f2fs_map_blocks()
warn: was || intended here instead of &&?
fs/f2fs/data.c
650 if (maxblocks > map->m_len) {
651 block_t blkaddr = datablock_addr(dn.node_page, dn.ofs_in_node);
652
653 if (blkaddr == NEW_ADDR && blkaddr == NULL_ADDR) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Impossible condition.
654 if (create) {
655 err = __allocate_data_block(&dn);
656 if (err)
657 goto sync_out;
658 allocated = true;
659 map->m_flags |= F2FS_MAP_NEW;
660 blkaddr = dn.data_blkaddr;
661 } else {
662 /*
663 * we only merge preallocated unwritten blocks
664 * for fiemap.
665 */
666 if (flag != F2FS_GET_BLOCK_FIEMAP ||
667 blkaddr != NEW_ADDR)
668 goto sync_out;
669 }
670 }
regards,
dan carpenter
------------------------------------------------------------------------------
next reply other threads:[~2015-09-21 16:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-21 16:25 Dan Carpenter [this message]
2015-09-21 18:43 ` f2fs: reorganize f2fs_map_blocks Jaegeuk Kim
2015-09-22 13:21 ` Chao Yu
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=20150921162508.GD5648@mwanda \
--to=dan.carpenter@oracle.com \
--cc=chao2.yu@samsung.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
/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).