]> git.baikalelectronics.ru Git - kernel.git/commit
sunrpc: add a get_rpccred_rcu inline
authorJeff Layton <jlayton@poochiereds.net>
Fri, 22 Apr 2016 00:51:56 +0000 (20:51 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Mon, 9 May 2016 13:05:40 +0000 (09:05 -0400)
commitea1542f9e3af9bf90087f3cf819042b540f3da85
treec042592a7ea30cb95d46670142e06f73d7b1d545
parentcf16d39cec007a523b3f6cf79a32514e4a7af504
sunrpc: add a get_rpccred_rcu inline

Sometimes we might have a RCU managed credential pointer and don't want
to use locking to handle it. Add a function that will take a reference
to the cred iff the refcount is not already zero. Callers can dereference
the pointer under the rcu_read_lock and use that function to take a
reference only if the cred is not on its way to destruction.

Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
include/linux/sunrpc/auth.h