linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Chao Yu <chao@kernel.org>
To: Fan Li <fanofcode.li@samsung.com>, 'Jaegeuk Kim' <jaegeuk@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [PATCH] f2fs: save a multiplication for last_nid calculation
Date: Thu, 2 Nov 2017 21:57:41 +0800	[thread overview]
Message-ID: <61f32d13-3e39-afcb-752f-90740c765a65@kernel.org> (raw)
In-Reply-To: <000101d35387$2dec7d40$89c577c0$@samsung.com>

On 2017/11/2 11:02, Fan Li wrote:
> Use a slightly easier way to calculate last_nid.
> 
> Signed-off-by: Fan li <fanofcode.li@samsung.com>

Reviewed-by: Chao Yu <yuchao0@huawei.com>

Thanks,

> ---
>  fs/f2fs/node.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
> index 7834097..55ab330 100644
> --- a/fs/f2fs/node.c
> +++ b/fs/f2fs/node.c
> @@ -2642,7 +2642,7 @@ static inline void load_free_nid_bitmap(struct f2fs_sb_info *sbi)
>                 __set_bit_le(i, nm_i->nat_block_bitmap);
> 
>                 nid = i * NAT_ENTRY_PER_BLOCK;
> -               last_nid = (i + 1) * NAT_ENTRY_PER_BLOCK;
> +               last_nid = nid + NAT_ENTRY_PER_BLOCK;
> 
>                 spin_lock(&NM_I(sbi)->nid_list_lock);
>                 for (; nid < last_nid; nid++)
> --
> 2.7.4
> 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

      reply	other threads:[~2017-11-02 13:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20171102030338epcas1p19ad41be52b4346e4828fd9e0cc92d711@epcas1p1.samsung.com>
2017-11-02  3:02 ` [PATCH] f2fs: save a multiplication for last_nid calculation Fan Li
2017-11-02 13:57   ` Chao Yu [this message]

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=61f32d13-3e39-afcb-752f-90740c765a65@kernel.org \
    --to=chao@kernel.org \
    --cc=fanofcode.li@samsung.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    /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).