aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCasey Bodley <cbodley@citi.umich.edu>2011-06-03 12:21:23 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-07-08 23:15:19 -0700
commit1036994e7bfd7957ddedd0c24c74e8ca07b03601 (patch)
treea320ea5ed83093789f81b10580148681ed7d3c06
parentf82d6a7238ab01903c290c56eae900d4b468c181 (diff)
nfsd: link returns nfserr_delay when breaking lease
commit 7d751f6f8c679f51b73d01a1b5269347a929004c upstream. fix for commit 4795bb37effb7b8fe77e2d2034545d062d3788a8, nfsd: break lease on unlink, link, and rename if the LINK operation breaks a delegation, it returns NFS4ERR_NOENT (which is not a valid error in rfc 5661) instead of NFS4ERR_DELAY. the return value of nfsd_break_lease() in nfsd_link() must be converted from host_err to err Signed-off-by: Casey Bodley <cbodley@citi.umich.edu> Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--fs/nfsd/vfs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index 129f3c9f62d..e64769d5a11 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -1653,8 +1653,10 @@ nfsd_link(struct svc_rqst *rqstp, struct svc_fh *ffhp,
if (!dold->d_inode)
goto out_drop_write;
host_err = nfsd_break_lease(dold->d_inode);
- if (host_err)
+ if (host_err) {
+ err = nfserrno(host_err);
goto out_drop_write;
+ }
host_err = vfs_link(dold, dirp, dnew);
if (!host_err) {
err = nfserrno(commit_metadata(ffhp));