lkml.org 
[lkml]   [2017]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] f2fs-tools: fix is_set_ckpt_flags for correct bool value
From
Date
On 2017/9/10 19:15, Yunlong Song wrote:
> If flag bit to check is in 0xFFFFFF00, then the return value will be false,
> this is not correct, so fix it.
>
> Signed-off-by: Yunlong Song <yunlong.song@huawei.com>

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

> ---
> fsck/f2fs.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fsck/f2fs.h b/fsck/f2fs.h
> index 871cffc..de03512 100644
> --- a/fsck/f2fs.h
> +++ b/fsck/f2fs.h
> @@ -276,7 +276,7 @@ static inline void *__bitmap_ptr(struct f2fs_sb_info *sbi, int flag)
> static inline bool is_set_ckpt_flags(struct f2fs_checkpoint *cp, unsigned int f)
> {
> unsigned int ckpt_flags = le32_to_cpu(cp->ckpt_flags);
> - return ckpt_flags & f;
> + return ckpt_flags & f ? 1 : 0;
> }
>
> static inline block_t __start_cp_addr(struct f2fs_sb_info *sbi)
>

\
 
 \ /
  Last update: 2017-09-12 03:13    [W:0.061 / U:1.928 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site