• Trond Myklebust's avatar
    NFS: Fix 2 use after free issues in the I/O code · 196639eb
    Trond Myklebust authored
    The writeback code wants to send a commit after processing the pages,
    which is why we want to delay releasing the struct path until after
    that's done.
    
    Also, the layout code expects that we do not free the inode before
    we've put the layout segments in pnfs_writehdr_free() and
    pnfs_readhdr_free()
    
    Fixes: 919e3bd9 ("NFS: Ensure we commit after writeback is complete")
    Fixes: 4714fb51 ("nfs: remove pgio_header refcount, related cleanup")
    Cc: stable@vger.kernel.org
    Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
    196639eb
pagelist.c 33.6 KB