• J
    Btrfs: igrab inode in writepage · be7bd730
    Josef Bacik 提交于
    We hit this panic on a few of our boxes this week where we have an
    ordered_extent with an NULL inode.  We do an igrab() of the inode in writepages,
    but weren't doing it in writepage which can be called directly from the VM on
    dirty pages.  If the inode has been unlinked then we could have I_FREEING set
    which means igrab() would return NULL and we get this panic.  Fix this by trying
    to igrab in btrfs_writepage, and if it returns NULL then just redirty the page
    and return AOP_WRITEPAGE_ACTIVATE; so the VM knows it wasn't successful.  Thanks,
    Signed-off-by: NJosef Bacik <jbacik@fb.com>
    Reviewed-by: NLiu Bo <bo.li.liu@oracle.com>
    Signed-off-by: NDavid Sterba <dsterba@suse.com>
    be7bd730
inode.c 266.6 KB