From 7df97b611781e7b341ce017c56dbad8d9bae5f69 Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Sat, 1 Sep 2001 20:11:05 +0000 Subject: [PATCH] o At some point, unmounting a non-EA file system with EA's compiled in got a bit broken, when ufs_extattr_stop() was called and failed, ufs_extattr_destroy() would panic. This makes the call to destroy() conditional on the success of stop(). Submitted by: Christian Carstensen Obtained from: TrustedBSD Project --- sys/ufs/ffs/ffs_vfsops.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index b137a90d650..c9607e57f27 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -834,11 +834,13 @@ ffs_unmount(mp, mntflags, p) flags |= FORCECLOSE; } #ifdef UFS_EXTATTR - if ((error = ufs_extattr_stop(mp, p))) + if ((error = ufs_extattr_stop(mp, p))) { if (error != EOPNOTSUPP) printf("ffs_unmount: ufs_extattr_stop returned %d\n", error); - ufs_extattr_uepm_destroy(&ump->um_extattr); + } else { + ufs_extattr_uepm_destroy(&ump->um_extattr); + } #endif if (mp->mnt_flag & MNT_SOFTDEP) { if ((error = softdep_flushfiles(mp, flags, p)) != 0)