Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 217201
b: refs/heads/master
c: 17cebf6
h: refs/heads/master
i:
  217199: ca8a83a
v: v3
  • Loading branch information
NeilBrown authored and J. Bruce Fields committed Sep 7, 2010
1 parent 7e0a142 commit 9586f94
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1132b26029918aa8fb5ba24a81b5c234e61f356c
refs/heads/master: 17cebf658e088935d4bdebfc7ad9800e9fc4a0b2
9 changes: 3 additions & 6 deletions trunk/fs/nfsd/export.c
Original file line number Diff line number Diff line change
Expand Up @@ -935,10 +935,9 @@ static void exp_fsid_unhash(struct svc_export *exp)

ek = exp_get_fsid_key(exp->ex_client, exp->ex_fsid);
if (!IS_ERR(ek)) {
ek->h.expiry_time = get_seconds()-1;
sunrpc_invalidate(&ek->h, &svc_expkey_cache);
cache_put(&ek->h, &svc_expkey_cache);
}
svc_expkey_cache.nextcheck = get_seconds();
}

static int exp_fsid_hash(svc_client *clp, struct svc_export *exp)
Expand Down Expand Up @@ -973,10 +972,9 @@ static void exp_unhash(struct svc_export *exp)

ek = exp_get_key(exp->ex_client, inode->i_sb->s_dev, inode->i_ino);
if (!IS_ERR(ek)) {
ek->h.expiry_time = get_seconds()-1;
sunrpc_invalidate(&ek->h, &svc_expkey_cache);
cache_put(&ek->h, &svc_expkey_cache);
}
svc_expkey_cache.nextcheck = get_seconds();
}

/*
Expand Down Expand Up @@ -1097,8 +1095,7 @@ exp_export(struct nfsctl_export *nxp)
static void
exp_do_unexport(svc_export *unexp)
{
unexp->h.expiry_time = get_seconds()-1;
svc_export_cache.nextcheck = get_seconds();
sunrpc_invalidate(&unexp->h, &svc_export_cache);
exp_unhash(unexp);
exp_fsid_unhash(unexp);
}
Expand Down
6 changes: 6 additions & 0 deletions trunk/include/linux/sunrpc/cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -228,4 +228,10 @@ static inline time_t get_expiry(char **bpp)
return rv;
}

static inline void sunrpc_invalidate(struct cache_head *h,
struct cache_detail *detail)
{
h->expiry_time = get_seconds() - 1;
detail->nextcheck = get_seconds();
}
#endif /* _LINUX_SUNRPC_CACHE_H_ */

0 comments on commit 9586f94

Please sign in to comment.