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:56:08 +0000 (12:56 +0100)
commit38ae938701e7b224d6f68338d3f0ea14821cbd28
tree4854ca9bc65918c32c27263c305132c10cb1480b
parent78c28fdf1685e5884963018fd3692b0ff6820805
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