summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Morton <akpm@digeo.com>2003-03-17 21:20:29 -0800
committerDave Jones <davej@codemonkey.org.uk>2003-03-17 21:20:29 -0800
commit18f3cae294f90eb9a96fafcc1ffe2c1bb837f5a2 (patch)
tree9b8905d2b6cff1b7d293acd44ded662b5f79f977
parent34b254caa82df44bc518512509c660fa44e19885 (diff)
[PATCH] Fix nfsd_symlink() failure path
Patch from Andreas Gruenbacher <agruen@suse.de> 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).
-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 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);
}
}