mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
NFS: don't store 'struct cred *' in struct nfs_access_entry
Storing the 'struct cred *' in nfs_access_entry is problematic.
An active 'cred' can keep a 'struct key *' active, and a quota is
imposed on the number of such keys that a user can maintain.
Cached 'nfs_access_entry' structs have indefinite lifetime, and having
these keep 'struct key's alive imposes on that quota.
So remove the 'struct cred *' and replace it with the fields we need:
kuid_t, kgid_t, and struct group_info *
This makes the 'struct nfs_access_entry' 64 bits larger.
New function "access_cmp" is introduced which is identical to
cred_fscmp() except that the second arg is an 'nfs_access_entry', rather
than a 'cred'
Fixes: b68572e07c ("NFS: change access cache to use 'struct cred'.")
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
committed by
Anna Schumaker
parent
73fbb3fa64
commit
6238aec83f
@@ -61,7 +61,9 @@
|
||||
struct nfs_access_entry {
|
||||
struct rb_node rb_node;
|
||||
struct list_head lru;
|
||||
const struct cred * cred;
|
||||
kuid_t fsuid;
|
||||
kgid_t fsgid;
|
||||
struct group_info *group_info;
|
||||
__u32 mask;
|
||||
struct rcu_head rcu_head;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user