• T
    rhashtable: Add rhashtable_free_and_destroy() · 6b6f302c
    Thomas Graf 提交于
    rhashtable_destroy() variant which stops rehashes, iterates over
    the table and calls a callback to release resources.
    
    Avoids need for nft_hash to embed rhashtable internals and allows to
    get rid of the being_destroyed flag. It also saves a 2nd mutex
    lock upon destruction.
    
    Also fixes an RCU lockdep splash on nft set destruction due to
    calling rht_for_each_entry_safe() without holding bucket locks.
    Open code this loop as we need know that no mutations may occur in
    parallel.
    Signed-off-by: NThomas Graf <tgraf@suug.ch>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    6b6f302c
rhashtable.h 24.2 KB