• NeilBrown's avatar
    NFS: don't store 'struct cred *' in struct nfs_access_entry · 6238aec8
    NeilBrown authored
    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: b68572e0 ("NFS: change access cache to use 'struct cred'.")
    Signed-off-by: default avatarNeilBrown <neilb@suse.de>
    Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
    6238aec8
dir.c 76.8 KB