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>
This commit is contained in:
parent
f2c7ea10f9
commit
83e0ed700d
1 changed files with 3 additions and 0 deletions
|
@ -1035,6 +1035,7 @@ static void *e_start(struct seq_file *m, loff_t *pos)
|
||||||
unsigned hash, export;
|
unsigned hash, export;
|
||||||
struct cache_head *ch;
|
struct cache_head *ch;
|
||||||
struct cache_detail *cd = m->private;
|
struct cache_detail *cd = m->private;
|
||||||
|
struct cache_head **export_table = cd->hash_table;
|
||||||
|
|
||||||
read_lock(&cd->hash_lock);
|
read_lock(&cd->hash_lock);
|
||||||
if (!n--)
|
if (!n--)
|
||||||
|
@ -1061,6 +1062,8 @@ static void *e_next(struct seq_file *m, void *p, loff_t *pos)
|
||||||
{
|
{
|
||||||
struct cache_head *ch = p;
|
struct cache_head *ch = p;
|
||||||
int hash = (*pos >> 32);
|
int hash = (*pos >> 32);
|
||||||
|
struct cache_detail *cd = m->private;
|
||||||
|
struct cache_head **export_table = cd->hash_table;
|
||||||
|
|
||||||
if (p == SEQ_START_TOKEN)
|
if (p == SEQ_START_TOKEN)
|
||||||
hash = 0;
|
hash = 0;
|
||||||
|
|
Loading…
Reference in a new issue