diff options
-rw-r--r-- | fs/nfsd/nfs4recover.c | 14 | ||||
-rw-r--r-- | fs/nfsd/nfs4state.c | 8 | ||||
-rw-r--r-- | fs/nfsd/state.h | 2 |
3 files changed, 10 insertions, 14 deletions
diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c index 376692ab1b3b..b657b622bf5d 100644 --- a/fs/nfsd/nfs4recover.c +++ b/fs/nfsd/nfs4recover.c | |||
@@ -58,7 +58,7 @@ struct nfsd4_client_tracking_ops { | |||
58 | void (*create)(struct nfs4_client *); | 58 | void (*create)(struct nfs4_client *); |
59 | void (*remove)(struct nfs4_client *); | 59 | void (*remove)(struct nfs4_client *); |
60 | int (*check)(struct nfs4_client *); | 60 | int (*check)(struct nfs4_client *); |
61 | void (*grace_done)(struct net *, time_t); | 61 | void (*grace_done)(struct nfsd_net *, time_t); |
62 | }; | 62 | }; |
63 | 63 | ||
64 | /* Globals */ | 64 | /* Globals */ |
@@ -391,10 +391,9 @@ purge_old(struct dentry *parent, struct dentry *child, struct nfsd_net *nn) | |||
391 | } | 391 | } |
392 | 392 | ||
393 | static void | 393 | static void |
394 | nfsd4_recdir_purge_old(struct net *net, time_t boot_time) | 394 | nfsd4_recdir_purge_old(struct nfsd_net *nn, time_t boot_time) |
395 | { | 395 | { |
396 | int status; | 396 | int status; |
397 | struct nfsd_net *nn = net_generic(net, nfsd_net_id); | ||
398 | 397 | ||
399 | in_grace = false; | 398 | in_grace = false; |
400 | if (!rec_file) | 399 | if (!rec_file) |
@@ -1017,11 +1016,10 @@ nfsd4_cld_check(struct nfs4_client *clp) | |||
1017 | } | 1016 | } |
1018 | 1017 | ||
1019 | static void | 1018 | static void |
1020 | nfsd4_cld_grace_done(struct net *net, time_t boot_time) | 1019 | nfsd4_cld_grace_done(struct nfsd_net *nn, time_t boot_time) |
1021 | { | 1020 | { |
1022 | int ret; | 1021 | int ret; |
1023 | struct cld_upcall *cup; | 1022 | struct cld_upcall *cup; |
1024 | struct nfsd_net *nn = net_generic(net, nfsd_net_id); | ||
1025 | struct cld_net *cn = nn->cld_net; | 1023 | struct cld_net *cn = nn->cld_net; |
1026 | 1024 | ||
1027 | cup = alloc_cld_upcall(cn); | 1025 | cup = alloc_cld_upcall(cn); |
@@ -1241,7 +1239,7 @@ nfsd4_umh_cltrack_check(struct nfs4_client *clp) | |||
1241 | } | 1239 | } |
1242 | 1240 | ||
1243 | static void | 1241 | static void |
1244 | nfsd4_umh_cltrack_grace_done(struct net __attribute__((unused)) *net, | 1242 | nfsd4_umh_cltrack_grace_done(struct nfsd_net __attribute__((unused)) *nn, |
1245 | time_t boot_time) | 1243 | time_t boot_time) |
1246 | { | 1244 | { |
1247 | char *legacy; | 1245 | char *legacy; |
@@ -1343,10 +1341,10 @@ nfsd4_client_record_check(struct nfs4_client *clp) | |||
1343 | } | 1341 | } |
1344 | 1342 | ||
1345 | void | 1343 | void |
1346 | nfsd4_record_grace_done(struct net *net, time_t boot_time) | 1344 | nfsd4_record_grace_done(struct nfsd_net *nn, time_t boot_time) |
1347 | { | 1345 | { |
1348 | if (client_tracking_ops) | 1346 | if (client_tracking_ops) |
1349 | client_tracking_ops->grace_done(net, boot_time); | 1347 | client_tracking_ops->grace_done(nn, boot_time); |
1350 | } | 1348 | } |
1351 | 1349 | ||
1352 | static int | 1350 | static int |
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 996a8a58944d..2e4ed691255a 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -3157,17 +3157,15 @@ out: | |||
3157 | } | 3157 | } |
3158 | 3158 | ||
3159 | static void | 3159 | static void |
3160 | nfsd4_end_grace(struct net *net) | 3160 | nfsd4_end_grace(struct nfsd_net *nn) |
3161 | { | 3161 | { |
3162 | struct nfsd_net *nn = net_generic(net, nfsd_net_id); | ||
3163 | |||
3164 | /* do nothing if grace period already ended */ | 3162 | /* do nothing if grace period already ended */ |
3165 | if (nn->grace_ended) | 3163 | if (nn->grace_ended) |
3166 | return; | 3164 | return; |
3167 | 3165 | ||
3168 | dprintk("NFSD: end of grace period\n"); | 3166 | dprintk("NFSD: end of grace period\n"); |
3169 | nn->grace_ended = true; | 3167 | nn->grace_ended = true; |
3170 | nfsd4_record_grace_done(net, nn->boot_time); | 3168 | nfsd4_record_grace_done(nn, nn->boot_time); |
3171 | locks_end_grace(&nn->nfsd4_manager); | 3169 | locks_end_grace(&nn->nfsd4_manager); |
3172 | /* | 3170 | /* |
3173 | * Now that every NFSv4 client has had the chance to recover and | 3171 | * Now that every NFSv4 client has had the chance to recover and |
@@ -3192,7 +3190,7 @@ nfs4_laundromat(void) | |||
3192 | nfs4_lock_state(); | 3190 | nfs4_lock_state(); |
3193 | 3191 | ||
3194 | dprintk("NFSD: laundromat service - starting\n"); | 3192 | dprintk("NFSD: laundromat service - starting\n"); |
3195 | nfsd4_end_grace(&init_net); | 3193 | nfsd4_end_grace(nn); |
3196 | INIT_LIST_HEAD(&reaplist); | 3194 | INIT_LIST_HEAD(&reaplist); |
3197 | spin_lock(&client_lock); | 3195 | spin_lock(&client_lock); |
3198 | list_for_each_safe(pos, next, &nn->client_lru) { | 3196 | list_for_each_safe(pos, next, &nn->client_lru) { |
diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h index bfe0106333cc..2deb6a88e58e 100644 --- a/fs/nfsd/state.h +++ b/fs/nfsd/state.h | |||
@@ -495,5 +495,5 @@ extern void nfsd4_client_tracking_exit(struct net *net); | |||
495 | extern void nfsd4_client_record_create(struct nfs4_client *clp); | 495 | extern void nfsd4_client_record_create(struct nfs4_client *clp); |
496 | extern void nfsd4_client_record_remove(struct nfs4_client *clp); | 496 | extern void nfsd4_client_record_remove(struct nfs4_client *clp); |
497 | extern int nfsd4_client_record_check(struct nfs4_client *clp); | 497 | extern int nfsd4_client_record_check(struct nfs4_client *clp); |
498 | extern void nfsd4_record_grace_done(struct net *net, time_t boot_time); | 498 | extern void nfsd4_record_grace_done(struct nfsd_net *nn, time_t boot_time); |
499 | #endif /* NFSD4_STATE_H */ | 499 | #endif /* NFSD4_STATE_H */ |