diff options
author | J. Bruce Fields <bfields@redhat.com> | 2012-01-02 17:49:12 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2012-01-05 15:23:19 -0500 |
commit | b8548894bde94ccee836e210274ff401225e9733 (patch) | |
tree | ac758f12693b60d8b959a290c270d918b0558296 /fs/nfsd | |
parent | aec39680b02ed55fcbb2bc87ad96eba16a651546 (diff) |
nfsd4: be forgiving in the absence of the recovery directory
If the recovery directory doesn't exist, then behavior after a reboot
will be suboptimal. But it's unnecessarily harsh to then prevent the
nfsv4 server from working at all. Instead just print a warning
(already done in nfsd4_init_recdir()) and soldier on.
Tested-by: Lior <lior@tonian.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/nfs4recover.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c index 28712e20bb11..eb01fffdc2f1 100644 --- a/fs/nfsd/nfs4recover.c +++ b/fs/nfsd/nfs4recover.c | |||
@@ -127,10 +127,11 @@ nfsd4_create_clid_dir(struct nfs4_client *clp) | |||
127 | 127 | ||
128 | dprintk("NFSD: nfsd4_create_clid_dir for \"%s\"\n", dname); | 128 | dprintk("NFSD: nfsd4_create_clid_dir for \"%s\"\n", dname); |
129 | 129 | ||
130 | if (!rec_file || clp->cl_firststate) | 130 | if (clp->cl_firststate) |
131 | return 0; | 131 | return 0; |
132 | |||
133 | clp->cl_firststate = 1; | 132 | clp->cl_firststate = 1; |
133 | if (!rec_file) | ||
134 | return -ENOENT; | ||
134 | status = nfs4_save_creds(&original_cred); | 135 | status = nfs4_save_creds(&original_cred); |
135 | if (status < 0) | 136 | if (status < 0) |
136 | return status; | 137 | return status; |