From 18f3cae294f90eb9a96fafcc1ffe2c1bb837f5a2 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Mon, 17 Mar 2003 21:20:29 -0800 Subject: [PATCH] Fix nfsd_symlink() failure path Patch from Andreas Gruenbacher In both 2.5 and 2.4, the fs/nfsd/vfs.c:nfsd_symlink() function calls down to notify_change(). If notify_change fails for some reason, the error code is not converted to an nfs no-the-wire error code as is should. The attached patches fix that (one for 2.4, the other for 2.5). --- fs/nfsd/vfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index 35a13a950f90..03e8f194fff2 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c @@ -1203,7 +1203,9 @@ nfsd_symlink(struct svc_rqst *rqstp, struct svc_fh *fhp, iap->ia_mode = (iap->ia_mode&S_IALLUGO) | S_IFLNK; err = notify_change(dnew, iap); - if (!err && EX_ISSYNC(fhp->fh_export)) + if (err) + err = nfserrno(err); + else if (EX_ISSYNC(fhp->fh_export)) write_inode_now(dentry->d_inode, 1); } } -- cgit v1.2.3