When we write extended attributes, assert that the inode hasn't

already been deleted.  The assertion is important to show that
we won't end up accounting for extended attribute blocks (using
fs_pendingblocks) in our subsequent call to fs_alloc().

Agreed verbally by: mckusick

MFC after:	3 weeks
This commit is contained in:
Brian Somers 2007-03-19 18:51:02 +00:00
parent 8b8ed7a78e
commit dd51858d31

View File

@ -1029,6 +1029,9 @@ ffs_extwrite(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *ucred)
fs = ip->i_fs;
dp = ip->i_din2;
KASSERT(!(ip->i_flag & IN_SPACECOUNTED), ("inode %u: inode is dead",
ip->i_number));
#ifdef DIAGNOSTIC
if (uio->uio_rw != UIO_WRITE || fs->fs_magic != FS_UFS2_MAGIC)
panic("ffs_extwrite: mode");