aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfsd/export.c10
-rw-r--r--include/linux/nfsd/export.h1
2 files changed, 6 insertions, 5 deletions
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
index 71c5ce35a1a5..99ea4c00240c 100644
--- a/fs/nfsd/export.c
+++ b/fs/nfsd/export.c
@@ -525,6 +525,7 @@ static int svc_export_parse(struct cache_detail *cd, char *mesg, int mlen)
525 goto out1; 525 goto out1;
526 526
527 exp.ex_client = dom; 527 exp.ex_client = dom;
528 exp.cd = cd;
528 529
529 /* expiry */ 530 /* expiry */
530 err = -EINVAL; 531 err = -EINVAL;
@@ -672,6 +673,7 @@ static void svc_export_init(struct cache_head *cnew, struct cache_head *citem)
672 new->ex_fslocs.locations = NULL; 673 new->ex_fslocs.locations = NULL;
673 new->ex_fslocs.locations_count = 0; 674 new->ex_fslocs.locations_count = 0;
674 new->ex_fslocs.migrated = 0; 675 new->ex_fslocs.migrated = 0;
676 new->cd = item->cd;
675} 677}
676 678
677static void export_update(struct cache_head *cnew, struct cache_head *citem) 679static void export_update(struct cache_head *cnew, struct cache_head *citem)
@@ -739,8 +741,7 @@ svc_export_lookup(struct svc_export *exp)
739 struct cache_head *ch; 741 struct cache_head *ch;
740 int hash = svc_export_hash(exp); 742 int hash = svc_export_hash(exp);
741 743
742 ch = sunrpc_cache_lookup(&svc_export_cache, &exp->h, 744 ch = sunrpc_cache_lookup(exp->cd, &exp->h, hash);
743 hash);
744 if (ch) 745 if (ch)
745 return container_of(ch, struct svc_export, h); 746 return container_of(ch, struct svc_export, h);
746 else 747 else
@@ -753,9 +754,7 @@ svc_export_update(struct svc_export *new, struct svc_export *old)
753 struct cache_head *ch; 754 struct cache_head *ch;
754 int hash = svc_export_hash(old); 755 int hash = svc_export_hash(old);
755 756
756 ch = sunrpc_cache_update(&svc_export_cache, &new->h, 757 ch = sunrpc_cache_update(old->cd, &new->h, &old->h, hash);
757 &old->h,
758 hash);
759 if (ch) 758 if (ch)
760 return container_of(ch, struct svc_export, h); 759 return container_of(ch, struct svc_export, h);
761 else 760 else
@@ -797,6 +796,7 @@ static svc_export *exp_get_by_name(svc_client *clp, const struct path *path,
797 796
798 key.ex_client = clp; 797 key.ex_client = clp;
799 key.ex_path = *path; 798 key.ex_path = *path;
799 key.cd = &svc_export_cache;
800 800
801 exp = svc_export_lookup(&key); 801 exp = svc_export_lookup(&key);
802 if (exp == NULL) 802 if (exp == NULL)
diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h
index f85308e688fd..64455292bbba 100644
--- a/include/linux/nfsd/export.h
+++ b/include/linux/nfsd/export.h
@@ -103,6 +103,7 @@ struct svc_export {
103 struct nfsd4_fs_locations ex_fslocs; 103 struct nfsd4_fs_locations ex_fslocs;
104 int ex_nflavors; 104 int ex_nflavors;
105 struct exp_flavor_info ex_flavors[MAX_SECINFO_LIST]; 105 struct exp_flavor_info ex_flavors[MAX_SECINFO_LIST];
106 struct cache_detail *cd;
106}; 107};
107 108
108/* an "export key" (expkey) maps a filehandlefragement to an 109/* an "export key" (expkey) maps a filehandlefragement to an