o Zero the ufs_extattr_header length field (not necessary, but not a bad

idea either) in ufs_extattr_rm.
o More completely fill out the local_aio structure when writing out the
  zero'd extended attribute in ufs_extattr_rm -- previoulsy, this worked
  fine, but probably should not have.  This corrects extraneous warnings
  about inconsistent inodes following file deletion.

Reviewed by:	jedgar
This commit is contained in:
Robert Watson 2001-01-07 23:31:51 +00:00
parent 9d5703550d
commit 4301368e49

View File

@ -845,10 +845,17 @@ ufs_extattr_rm(struct vnode *vp, const char *name, struct ucred *cred,
/* flag it as not in use */
ueh.ueh_flags = 0;
ueh.ueh_len = 0;
local_aiov.iov_base = (caddr_t) &ueh;
local_aiov.iov_len = sizeof(struct ufs_extattr_header);
local_aio.uio_iov = &local_aiov;
local_aio.uio_iovcnt = 1;
local_aio.uio_rw = UIO_WRITE;
local_aio.uio_segflg = UIO_SYSSPACE;
local_aio.uio_procp = p;
local_aio.uio_offset = base_offset;
local_aio.uio_resid = sizeof(struct ufs_extattr_header);
local_aio.uio_rw = UIO_WRITE;
error = VOP_WRITE(attribute->uele_backing_vnode, &local_aio,
IO_NODELOCKED | IO_SYNC, ump->um_extattr.uepm_ucred);