• Tejun Heo's avatar
    blk-throttle: clean up blkg_policy_data alloc/init/exit/free methods · b2ce2643
    Tejun Heo authored
    
    
    With the recent addition of alloc and free methods, things became
    messier.  This patch reorganizes them according to the followings.
    
    * ->pd_alloc_fn()
    
      Responsible for allocation and static initializations - the ones
      which can be done independent of where the pd might be attached.
    
    * ->pd_init_fn()
    
      Initializations which require the knowledge of where the pd is
      attached.
    
    * ->pd_free_fn()
    
      The counter part of pd_alloc_fn().  Static de-init and freeing.
    
    This leaves ->pd_exit_fn() without any users.  Removed.
    
    While at it, collapse an one liner function throtl_pd_exit(), which
    has only one user, into its user.
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Cc: Vivek Goyal <vgoyal@redhat.com>
    Signed-off-by: default avatarJens Axboe <axboe@fb.com>
    b2ce2643
blk-cgroup.h 17.7 KB