• Trond Myklebust's avatar
    NFS: Avoid races between writebacks and truncation · cd52ed35
    Trond Myklebust authored
    Currently, there is no serialisation between NFS asynchronous writebacks
    and truncation at the page level due to the fact that nfs_sync_inode()
    cannot lock the pages that it is about to write out.
    
    This means that it is possible to be flushing out data (and calling something
    like set_page_writeback()) while the page cache is busy evicting the page.
    Oops...
    
    Use the hooks provided in try_to_release_page() to ensure that dirty pages
    are always written back to storage before we evict them.
    Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
    cd52ed35
file.c 14.8 KB