• N
    staging: lustre: change some LIBCFS_ALLOC calls to k?alloc(GFP_KERNEL) · 12e46c46
    NeilBrown 提交于
    When an allocation happens from process context rather than
    filesystem context, it is best to use GFP_KERNEL rather than
    LIBCFS_ALLOC() which always uses GFP_NOFS.
    This include initialization during, or prior to, mount,
    and code run from separate worker threads.
    
    So for some of these cases, switch to kmalloc, kvmalloc, or
    kvmalloc_array() as appropriate.
    In some cases we preserve __GFP_ZERO (via kzalloc/kvzalloc), but in
    others it is clear that allocated memory is immediately initialized.
    
    In each case, the matching LIBCFS_FREE() is converted to
    kfree() or kvfree()
    
    This is just a subset of locations that need changing.
    As there are quite a lot, I've broken them up into several
    ad-hoc sets to avoid review-fatigue.
    Signed-off-by: NNeilBrown <neilb@suse.com>
    Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    12e46c46
socklnd.c 70.0 KB