diff options
author | J. Bruce Fields <bfields@redhat.com> | 2012-01-02 17:30:05 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2012-01-02 17:32:59 -0500 |
commit | aec39680b02ed55fcbb2bc87ad96eba16a651546 (patch) | |
tree | 82a98b007a9bce8fbd290584da812c446c74ae59 /fs | |
parent | 2d3475c0ad625f7a43844a6cd0130d136416e604 (diff) |
nfsd4: fix spurious 4.1 post-reboot failures
In the NFSv4.1 case, this could cause a spurious "NFSD: failed to write
recovery record (err -17); please check that /var/lib/nfs/v4recovery
exists and is writable.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Reported-by: Steve Dickson <SteveD@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfsd/nfs4recover.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c index ed083b9a731b..28712e20bb11 100644 --- a/fs/nfsd/nfs4recover.c +++ b/fs/nfsd/nfs4recover.c | |||
@@ -144,8 +144,15 @@ nfsd4_create_clid_dir(struct nfs4_client *clp) | |||
144 | status = PTR_ERR(dentry); | 144 | status = PTR_ERR(dentry); |
145 | goto out_unlock; | 145 | goto out_unlock; |
146 | } | 146 | } |
147 | status = -EEXIST; | ||
148 | if (dentry->d_inode) | 147 | if (dentry->d_inode) |
148 | /* | ||
149 | * In the 4.1 case, where we're called from | ||
150 | * reclaim_complete(), records from the previous reboot | ||
151 | * may still be left, so this is OK. | ||
152 | * | ||
153 | * In the 4.0 case, we should never get here; but we may | ||
154 | * as well be forgiving and just succeed silently. | ||
155 | */ | ||
149 | goto out_put; | 156 | goto out_put; |
150 | status = mnt_want_write(rec_file->f_path.mnt); | 157 | status = mnt_want_write(rec_file->f_path.mnt); |
151 | if (status) | 158 | if (status) |