Commit 83e0ed700d4d2cad2f555ae536fafd531f55b6d0

Authored by Stanislav Kinsbursky
Committed by J. Bruce Fields
1 parent f2c7ea10f9

nfsd: use hash table from cache detail in nfsd export seq ops

Hard-code is redundant and will prevent from making caches per net ns.

Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>

Showing 1 changed file with 3 additions and 0 deletions Side-by-side Diff

... ... @@ -1035,6 +1035,7 @@
1035 1035 unsigned hash, export;
1036 1036 struct cache_head *ch;
1037 1037 struct cache_detail *cd = m->private;
  1038 + struct cache_head **export_table = cd->hash_table;
1038 1039  
1039 1040 read_lock(&cd->hash_lock);
1040 1041 if (!n--)
... ... @@ -1061,6 +1062,8 @@
1061 1062 {
1062 1063 struct cache_head *ch = p;
1063 1064 int hash = (*pos >> 32);
  1065 + struct cache_detail *cd = m->private;
  1066 + struct cache_head **export_table = cd->hash_table;
1064 1067  
1065 1068 if (p == SEQ_START_TOKEN)
1066 1069 hash = 0;