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

2016-05-26 Thread Yunlong Song
> 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); > +

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

2016-05-25 Thread Yunlong Song
Commit aaf9607516ed38825268515ef4d773289a44f429 ("f2fs: check node page contents all the time") pointed out that "sometimes it was reported that its contents was missing", so it checks the page's mapping and contents. When "nid != nid_of_node(page)", ERR_PTR(-EIO) will be returned to the caller. Ho