Skip to content
Snippets Groups Projects
Forked from drm / msm
86976 commits behind the upstream repository.
  • Darrick J. Wong's avatar
    9b2e5a23
    xfs: create traced helper to get extra perag references · 9b2e5a23
    Darrick J. Wong authored
    
    There are a few places in the XFS codebase where a caller has either an
    active or a passive reference to a perag structure and wants to give
    a passive reference to some other piece of code.  Btree cursor creation
    and inode walks are good examples of this.  Replace the open-coded logic
    with a helper to do this.
    
    The new function adds a few safeguards -- it checks that there's at
    least one reference to the perag structure passed in, and it records the
    refcount bump in the ftrace information.  This makes it much easier to
    debug perag refcounting problems.
    
    Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
    Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
    9b2e5a23
    History
    xfs: create traced helper to get extra perag references
    Darrick J. Wong authored
    
    There are a few places in the XFS codebase where a caller has either an
    active or a passive reference to a perag structure and wants to give
    a passive reference to some other piece of code.  Btree cursor creation
    and inode walks are good examples of this.  Replace the open-coded logic
    with a helper to do this.
    
    The new function adds a few safeguards -- it checks that there's at
    least one reference to the perag structure passed in, and it records the
    refcount bump in the ftrace information.  This makes it much easier to
    debug perag refcounting problems.
    
    Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
    Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
xfs_iwalk.c 20.58 KiB