https://bugzilla.kernel.org/show_bug.cgi?id=216050

--- Comment #59 from Yuriy Garin (yuriy.ga...@gmail.com) ---
Please forgive my ignorance, I'm sure I'm getting it wrong.

How this 'goto repeat' supposed to break a cycle?

Here is a simplified code of f2fs_get_lock_data_page():

struct page *f2fs_get_lock_data_page(struct inode *inode, ...)
{
repeat:
        /* get page by inode - from cache or disk */
        struct page *page = f2fs_get_read_data_page(inode, ...);
        if (page->mapping != inode->i_mapping) {
                /* page has bad mapping */
                f2fs_put_page(page, 1); /* put page bad mapping back in cache
*/
                goto repeat; /* do it again, without changing anything */
        }

        return page; /* good */
}

We look by inode for a page - in cache or disk.
Got page, but it has a "wrong" mapping.
We put a page - with "wrong" mapping - back into cache.
And, without changing anything - in inode info or page info - we are trying to
get a different result by doing the same thing with the same conditions.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to