Commit 6238aec
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: b68572e ("NFS: change access cache to use 'struct cred'.")
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>1 parent 73fbb3f commit 6238aec
3 files changed
+47
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2528 | 2528 | | |
2529 | 2529 | | |
2530 | 2530 | | |
2531 | | - | |
| 2531 | + | |
2532 | 2532 | | |
2533 | 2533 | | |
2534 | 2534 | | |
| |||
2654 | 2654 | | |
2655 | 2655 | | |
2656 | 2656 | | |
| 2657 | + | |
| 2658 | + | |
| 2659 | + | |
| 2660 | + | |
| 2661 | + | |
| 2662 | + | |
| 2663 | + | |
| 2664 | + | |
| 2665 | + | |
| 2666 | + | |
| 2667 | + | |
| 2668 | + | |
| 2669 | + | |
| 2670 | + | |
| 2671 | + | |
| 2672 | + | |
| 2673 | + | |
| 2674 | + | |
| 2675 | + | |
| 2676 | + | |
| 2677 | + | |
| 2678 | + | |
| 2679 | + | |
| 2680 | + | |
| 2681 | + | |
| 2682 | + | |
| 2683 | + | |
| 2684 | + | |
| 2685 | + | |
| 2686 | + | |
| 2687 | + | |
| 2688 | + | |
| 2689 | + | |
| 2690 | + | |
| 2691 | + | |
| 2692 | + | |
| 2693 | + | |
2657 | 2694 | | |
2658 | 2695 | | |
2659 | 2696 | | |
2660 | 2697 | | |
2661 | 2698 | | |
2662 | 2699 | | |
2663 | 2700 | | |
2664 | | - | |
| 2701 | + | |
2665 | 2702 | | |
2666 | 2703 | | |
2667 | 2704 | | |
| |||
2731 | 2768 | | |
2732 | 2769 | | |
2733 | 2770 | | |
2734 | | - | |
| 2771 | + | |
2735 | 2772 | | |
2736 | 2773 | | |
2737 | 2774 | | |
| |||
2773 | 2810 | | |
2774 | 2811 | | |
2775 | 2812 | | |
2776 | | - | |
| 2813 | + | |
2777 | 2814 | | |
2778 | 2815 | | |
2779 | 2816 | | |
| |||
2802 | 2839 | | |
2803 | 2840 | | |
2804 | 2841 | | |
2805 | | - | |
| 2842 | + | |
| 2843 | + | |
| 2844 | + | |
2806 | 2845 | | |
2807 | 2846 | | |
2808 | 2847 | | |
| |||
2895 | 2934 | | |
2896 | 2935 | | |
2897 | 2936 | | |
2898 | | - | |
2899 | 2937 | | |
2900 | 2938 | | |
2901 | 2939 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2653 | 2653 | | |
2654 | 2654 | | |
2655 | 2655 | | |
2656 | | - | |
2657 | 2656 | | |
2658 | 2657 | | |
2659 | 2658 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
| |||
0 commit comments