Skip to content
  • Nicolai Stange's avatar
    debugfs: add support for more elaborate ->d_fsdata · 7c8d4698
    Nicolai Stange authored
    
    
    Currently, the user provided fops, "real_fops", are stored directly into
    ->d_fsdata.
    
    In order to be able to store more per-file state and thus prepare for more
    granular file removal protection, wrap the real_fops into a dynamically
    allocated container struct, debugfs_fsdata.
    
    A struct debugfs_fsdata gets allocated at file creation and freed from the
    newly intoduced ->d_release().
    
    Finally, move the implementation of debugfs_real_fops() out of the public
    debugfs header such that struct debugfs_fsdata's declaration can be kept
    private.
    
    Signed-off-by: default avatarNicolai Stange <nicstange@gmail.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    7c8d4698