]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit - include/linux/cred.h
cred: allow get_cred() and put_cred() to be given NULL.
authorNeilBrown <neilb@suse.com>
Mon, 3 Dec 2018 00:30:30 +0000 (11:30 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Oct 2021 13:05:11 +0000 (15:05 +0200)
commitbabe2c4a00da1c28c006f6c0e0b22f3c82581fe5
treee7ac2638a53a4974fb458a7583e7a096e60f3e0b
parentc3156fea4d8a0e643625dff69a0421e872d1fdae
cred: allow get_cred() and put_cred() to be given NULL.

commit f06bc03339ad4c1baa964a5f0606247ac1c3c50b upstream.

It is common practice for helpers like this to silently,
accept a NULL pointer.
get_rpccred() and put_rpccred() used by NFS act this way
and using the same interface will ease the conversion
for NFS, and simplify the resulting code.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/cred.h