Commit 18f3cae2 authored by Andrew Morton's avatar Andrew Morton Committed by Dave Jones

[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).
parent 34b254ca
......@@ -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);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment