aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCasey Bodley <cbodley@citi.umich.edu>2011-06-03 12:21:23 -0400
committerJ. Bruce Fields <bfields@redhat.com>2011-06-06 18:46:56 -0400
commit7d751f6f8c679f51b73d01a1b5269347a929004c (patch)
treed3197afcf1f8f241000eca04c45735fff973e70d
parentbe1f4084b4824301e640e81d63b6275cd99ee6a1 (diff)
nfsd: link returns nfserr_delay when breaking lease
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> Cc: stable@kernel.org Signed-off-by: J. Bruce Fields <bfields@redhat.com>
-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 d5718273bb32..f3fb61b69a1e 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -1660,8 +1660,10 @@ nfsd_link(struct svc_rqst *rqstp, struct svc_fh *ffhp,
1660 if (!dold->d_inode) 1660 if (!dold->d_inode)
1661 goto out_drop_write; 1661 goto out_drop_write;
1662 host_err = nfsd_break_lease(dold->d_inode); 1662 host_err = nfsd_break_lease(dold->d_inode);
1663 if (host_err) 1663 if (host_err) {
1664 err = nfserrno(host_err);
1664 goto out_drop_write; 1665 goto out_drop_write;
1666 }
1665 host_err = vfs_link(dold, dirp, dnew); 1667 host_err = vfs_link(dold, dirp, dnew);
1666 if (!host_err) { 1668 if (!host_err) {
1667 err = nfserrno(commit_metadata(ffhp)); 1669 err = nfserrno(commit_metadata(ffhp));