diff options
author | Stanislav Kinsbursky <skinsbursky@parallels.com> | 2012-11-26 08:16:30 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2012-11-28 10:13:54 -0500 |
commit | f141f79d709de447c8c92ba54821740ae53a5d07 (patch) | |
tree | ba95be5f9ebb6c532727c7b0acb169be41da6ef0 /fs/nfsd/nfs4recover.c | |
parent | 3a0733692f6665a28c50ebadb6d9db2b183bcb91 (diff) |
nfsd: recovery - make in_grace per net
Flag in_grace is a part of client tracking state, which is network namesapce
aware. So let'a replace global static variable with per-net one.
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4recover.c')
-rw-r--r-- | fs/nfsd/nfs4recover.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c index 3e76d281bba8..359793f89493 100644 --- a/fs/nfsd/nfs4recover.c +++ b/fs/nfsd/nfs4recover.c | |||
@@ -64,7 +64,6 @@ struct nfsd4_client_tracking_ops { | |||
64 | /* Globals */ | 64 | /* Globals */ |
65 | static char user_recovery_dirname[PATH_MAX] = "/var/lib/nfs/v4recovery"; | 65 | static char user_recovery_dirname[PATH_MAX] = "/var/lib/nfs/v4recovery"; |
66 | static struct nfsd4_client_tracking_ops *client_tracking_ops; | 66 | static struct nfsd4_client_tracking_ops *client_tracking_ops; |
67 | static bool in_grace; | ||
68 | 67 | ||
69 | static int | 68 | static int |
70 | nfs4_save_creds(const struct cred **original_creds) | 69 | nfs4_save_creds(const struct cred **original_creds) |
@@ -221,7 +220,7 @@ out_put: | |||
221 | out_unlock: | 220 | out_unlock: |
222 | mutex_unlock(&dir->d_inode->i_mutex); | 221 | mutex_unlock(&dir->d_inode->i_mutex); |
223 | if (status == 0) { | 222 | if (status == 0) { |
224 | if (in_grace) { | 223 | if (nn->in_grace) { |
225 | crp = nfs4_client_to_reclaim(dname, nn); | 224 | crp = nfs4_client_to_reclaim(dname, nn); |
226 | if (crp) | 225 | if (crp) |
227 | crp->cr_clp = clp; | 226 | crp->cr_clp = clp; |
@@ -358,7 +357,7 @@ nfsd4_remove_clid_dir(struct nfs4_client *clp) | |||
358 | nfs4_reset_creds(original_cred); | 357 | nfs4_reset_creds(original_cred); |
359 | if (status == 0) { | 358 | if (status == 0) { |
360 | vfs_fsync(nn->rec_file, 0); | 359 | vfs_fsync(nn->rec_file, 0); |
361 | if (in_grace) { | 360 | if (nn->in_grace) { |
362 | /* remove reclaim record */ | 361 | /* remove reclaim record */ |
363 | crp = nfsd4_find_reclaim_client(dname, nn); | 362 | crp = nfsd4_find_reclaim_client(dname, nn); |
364 | if (crp) | 363 | if (crp) |
@@ -394,7 +393,7 @@ nfsd4_recdir_purge_old(struct nfsd_net *nn, time_t boot_time) | |||
394 | { | 393 | { |
395 | int status; | 394 | int status; |
396 | 395 | ||
397 | in_grace = false; | 396 | nn->in_grace = false; |
398 | if (!nn->rec_file) | 397 | if (!nn->rec_file) |
399 | return; | 398 | return; |
400 | status = mnt_want_write_file(nn->rec_file); | 399 | status = mnt_want_write_file(nn->rec_file); |
@@ -473,7 +472,7 @@ nfsd4_init_recdir(struct net *net) | |||
473 | 472 | ||
474 | nfs4_reset_creds(original_cred); | 473 | nfs4_reset_creds(original_cred); |
475 | if (!status) | 474 | if (!status) |
476 | in_grace = true; | 475 | nn->in_grace = true; |
477 | return status; | 476 | return status; |
478 | } | 477 | } |
479 | 478 | ||