Skip to content

Commit

Permalink
nfsd: use hash table from cache detail in nfsd export seq ops
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stanislav Kinsbursky authored and J. Bruce Fields committed Apr 11, 2012
1 parent f2c7ea1 commit 83e0ed7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fs/nfsd/export.c
Original file line number Diff line number Diff line change
Expand Up @@ -1035,6 +1035,7 @@ static void *e_start(struct seq_file *m, loff_t *pos)
unsigned hash, export;
struct cache_head *ch;
struct cache_detail *cd = m->private;
struct cache_head **export_table = cd->hash_table;

read_lock(&cd->hash_lock);
if (!n--)
Expand All @@ -1061,6 +1062,8 @@ static void *e_next(struct seq_file *m, void *p, loff_t *pos)
{
struct cache_head *ch = p;
int hash = (*pos >> 32);
struct cache_detail *cd = m->private;
struct cache_head **export_table = cd->hash_table;

if (p == SEQ_START_TOKEN)
hash = 0;
Expand Down

0 comments on commit 83e0ed7

Please sign in to comment.