diff options
author | tmm <tmm@FreeBSD.org> | 2001-05-25 18:24:52 +0000 |
---|---|---|
committer | tmm <tmm@FreeBSD.org> | 2001-05-25 18:24:52 +0000 |
commit | 76ca05f26f8d877cbb2daa7d37c391fa80170d43 (patch) | |
tree | 21c39b952f503059fd596997fa5f4e7b3ce4ab5e /sys/ufs | |
parent | 61a33a70854fe3ce3f60afcbd6b56197afa48bf1 (diff) | |
download | FreeBSD-src-76ca05f26f8d877cbb2daa7d37c391fa80170d43.zip FreeBSD-src-76ca05f26f8d877cbb2daa7d37c391fa80170d43.tar.gz |
Add a check to determine whether extended attributes have been
initialized on the file system before trying to grab the lock of the
per-mount extattr structure, as this lock is unitialized in that case.
This is needed because ufs_extattr_vnode_inactive is called from
ufs_inactive, which is also used by EA-unaware file systems such as
ext2fs.
Reviewed by: rwatson
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ufs/ufs_extattr.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/ufs/ufs/ufs_extattr.c b/sys/ufs/ufs/ufs_extattr.c index 817fde3..a43baea 100644 --- a/sys/ufs/ufs/ufs_extattr.c +++ b/sys/ufs/ufs/ufs_extattr.c @@ -1250,6 +1250,14 @@ ufs_extattr_vnode_inactive(struct vnode *vp, struct proc *p) struct mount *mp = vp->v_mount; struct ufsmount *ump = VFSTOUFS(mp); + /* + * In that case, we cannot lock. We should not have any active vnodes + * on the fs if this is not yet initialized but is going to be, so + * this can go unlocked. + */ + if (!(ump->um_extattr.uepm_flags & UFS_EXTATTR_UEPM_INITIALIZED)) + return; + ufs_extattr_uepm_lock(ump, p); if (!(ump->um_extattr.uepm_flags & UFS_EXTATTR_UEPM_STARTED)) { |