Use our mount-credential if we get a NOCRED when we try to write out EA

space back to disk.

This is wrong in many ways, but not as wrong as a panic.

Pancied on:	rwatson & jmallet
Sponsored by:	DARPA & NAI Labs.
This commit is contained in:
Poul-Henning Kamp 2002-09-27 20:00:03 +00:00
parent 0fbf938869
commit 993b0567b2

View file

@ -1436,6 +1436,8 @@ ffs_close_ea(struct vnode *vp, int commit, struct ucred *cred, struct thread *td
dp = ip->i_din2;
error = ip->i_ea_error;
if (commit && error == 0) {
if (cred == NOCRED)
cred = vp->v_mount->mnt_cred;
liovec.iov_base = ip->i_ea_area;
liovec.iov_len = ip->i_ea_len;
luio.uio_iov = &liovec;