• Tejun Heo's avatar
    ipc: convert to idr_alloc() · 54924ea3
    Tejun Heo authored
    Convert to the much saner new idr interface.
    
    The new interface doesn't directly translate to the way idr_pre_get()
    was used around ipc_addid() as preloading disables preemption.  From
    my cursory reading, it seems like we should be able to do all
    allocation from ipc_addid(), so I moved it there.  Can you please
    check whether this would be okay?  If this is wrong and ipc_addid()
    should be allowed to be called from non-sleepable context, I'd suggest
    allocating id itself in the outer functions and later install the
    pointer using idr_replace().
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Reported-by: default avatarSedat Dilek <sedat.dilek@gmail.com>
    Tested-by: default avatarSedat Dilek <sedat.dilek@gmail.com>
    Cc: Stanislav Kinsbursky <skinsbursky@parallels.com>
    Cc: "Eric W. Biederman" <ebiederm@xmission.com>
    Cc: James Morris <jmorris@namei.org>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    54924ea3
util.c 23.1 KB