diff options
Diffstat (limited to 'fs/nfsd/nfs4recover.c')
-rw-r--r-- | fs/nfsd/nfs4recover.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c index 0b3e875d1abd..6523809839c3 100644 --- a/fs/nfsd/nfs4recover.c +++ b/fs/nfsd/nfs4recover.c | |||
@@ -126,9 +126,8 @@ void nfsd4_create_clid_dir(struct nfs4_client *clp) | |||
126 | 126 | ||
127 | dprintk("NFSD: nfsd4_create_clid_dir for \"%s\"\n", dname); | 127 | dprintk("NFSD: nfsd4_create_clid_dir for \"%s\"\n", dname); |
128 | 128 | ||
129 | if (clp->cl_firststate) | 129 | if (test_and_set_bit(NFSD4_CLIENT_STABLE, &clp->cl_flags)) |
130 | return; | 130 | return; |
131 | clp->cl_firststate = 1; | ||
132 | if (!rec_file) | 131 | if (!rec_file) |
133 | return; | 132 | return; |
134 | status = nfs4_save_creds(&original_cred); | 133 | status = nfs4_save_creds(&original_cred); |
@@ -271,13 +270,13 @@ nfsd4_remove_clid_dir(struct nfs4_client *clp) | |||
271 | const struct cred *original_cred; | 270 | const struct cred *original_cred; |
272 | int status; | 271 | int status; |
273 | 272 | ||
274 | if (!rec_file || !clp->cl_firststate) | 273 | if (!rec_file || !test_bit(NFSD4_CLIENT_STABLE, &clp->cl_flags)) |
275 | return; | 274 | return; |
276 | 275 | ||
277 | status = mnt_want_write_file(rec_file); | 276 | status = mnt_want_write_file(rec_file); |
278 | if (status) | 277 | if (status) |
279 | goto out; | 278 | goto out; |
280 | clp->cl_firststate = 0; | 279 | clear_bit(NFSD4_CLIENT_STABLE, &clp->cl_flags); |
281 | 280 | ||
282 | status = nfs4_save_creds(&original_cred); | 281 | status = nfs4_save_creds(&original_cred); |
283 | if (status < 0) | 282 | if (status < 0) |