Re: [PATCH v2] f2fs: Return the errno to the caller to avoid using a wrong page

From: Yunlong Song
Date: Thu May 26 2016 - 07:31:47 EST



> page_hit:
> - f2fs_bug_on(sbi, nid != nid_of_node(page));
> + if(nid != nid_of_node(page)) {

should add "unlikely" here, will fix this in v3 patch.

> + f2fs_bug_on(sbi, 1);
> + ClearPageUptodate(page);
> +out_err:
> + f2fs_put_page(page, 1);
> + return ERR_PTR(-EIO);
> + }
> return page;
> }
>
>


--
Thanks,
Yunlong Song