Hello Alistair Popple,

The patch 9c4409f51aa3: "fs/dax: properly refcount fs dax pages" from
Jan 7, 2025, leads to the following Smatch static checker warning:

        fs/dax.c:987 dax_break_mapping_uninterruptible()
        warn: duplicate check 'page' (previous on line 981)

fs/dax.c
    977 
    978         do {
    979                 page = dax_layout_busy_page_range(inode->i_mapping, 0,
    980                                                 LLONG_MAX);
    981                 if (!page)
    982                         break;

This loop will only break when page is NULL.

    983 
    984                 wait_page_idle_uninterruptible(page, cb, inode);
    985         } while (true);
    986 
--> 987         if (!page)
                    ^^^^^
No need to check.

    988                 dax_delete_mapping_range(inode->i_mapping, 0, 
LLONG_MAX);
    989 }

regards,
dan carpenter

Reply via email to