lkml.org 
[lkml]   [2017]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 20/20] ipc/util.h: Update documentation for ipc_getref() and ipc_putref()
    Date
    Now that ipc_rcu_alloc() and ipc_rcu_free() are removed,
    document when it is valid to use ipc_getref() and ipc_putref().

    Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
    ---
    ipc/util.h | 3 +++
    1 file changed, 3 insertions(+)

    diff --git a/ipc/util.h b/ipc/util.h
    index 77336c2b..c692010 100644
    --- a/ipc/util.h
    +++ b/ipc/util.h
    @@ -112,6 +112,9 @@ int ipcperms(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp, short flg);
    * Objects are reference counted, they start with reference count 1.
    * getref increases the refcount, the putref call that reduces the recount
    * to 0 schedules the rcu destruction. Caller must guarantee locking.
    + *
    + * refcount is initialized by ipc_addid(), before that point call_rcu()
    + * must be used.
    */
    int ipc_rcu_getref(struct kern_ipc_perm *ptr);
    void ipc_rcu_putref(struct kern_ipc_perm *ptr,
    --
    2.9.3
    \
     
     \ /
      Last update: 2017-05-25 20:53    [W:3.561 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site