Skip to content

Commit

Permalink
nfsd4: fix spurious 4.1 post-reboot failures
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
J. Bruce Fields committed Jan 2, 2012
1 parent 2d3475c commit aec3968
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion fs/nfsd/nfs4recover.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,15 @@ nfsd4_create_clid_dir(struct nfs4_client *clp)
status = PTR_ERR(dentry);
goto out_unlock;
}
status = -EEXIST;
if (dentry->d_inode)
/*
* In the 4.1 case, where we're called from
* reclaim_complete(), records from the previous reboot
* may still be left, so this is OK.
*
* In the 4.0 case, we should never get here; but we may
* as well be forgiving and just succeed silently.
*/
goto out_put;
status = mnt_want_write(rec_file->f_path.mnt);
if (status)
Expand Down

0 comments on commit aec3968

Please sign in to comment.