NFS: change nfs_access_get_cached to only report the mask
authorNeilBrown <neilb@suse.de>
Mon, 27 Sep 2021 23:47:57 +0000 (09:47 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Feb 2022 11:54:18 +0000 (12:54 +0100)
commite2b4435fd340f95a1424081bff52f25c1eb8ca99
treec80949be1cb5a52e23387fd0d87d86e8f2818ab8
parentb4e0c9bcf142936f9fe43710587d4765152d8139
NFS: change nfs_access_get_cached to only report the mask

[ Upstream commit b5e7b59c3480f355910f9d2c6ece5857922a5e54 ]

Currently the nfs_access_get_cached family of functions report a
'struct nfs_access_entry' as the result, with both .mask and .cred set.
However the .cred is never used.  This is probably good and there is no
guarantee that it won't be freed before use.

Change to only report the 'mask' - as this is all that is used or needed.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/dir.c
fs/nfs/nfs4proc.c
include/linux/nfs_fs.h