diff options
author | kib <kib@FreeBSD.org> | 2009-01-08 12:48:27 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2009-01-08 12:48:27 +0000 |
commit | 1f52da301fa5379c80d0cff685919ebf84bbfcb2 (patch) | |
tree | bdb8d6af6d0e17b47d178837d0c39bd94e68cb85 /sys/ufs/ffs | |
parent | 97fa3042030bec26a377d4e4e2700219cdb2e668 (diff) | |
download | FreeBSD-src-1f52da301fa5379c80d0cff685919ebf84bbfcb2.zip FreeBSD-src-1f52da301fa5379c80d0cff685919ebf84bbfcb2.tar.gz |
If unmount of the ffs mp failed, reinitialize the extended attributes
for the mp, and restart them if autostart is enabled.
Reported and tested by: pho
Reviewed by: rwatson
MFC after: 3 weeks
Diffstat (limited to 'sys/ufs/ffs')
-rw-r--r-- | sys/ufs/ffs/ffs_vfsops.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 563473c..d5a1a4f 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -1030,6 +1030,9 @@ ffs_unmount(mp, mntflags, td) struct ufsmount *ump = VFSTOUFS(mp); struct fs *fs; int error, flags, susp; +#ifdef UFS_EXTATTR + int e_restart; +#endif flags = 0; fs = ump->um_fs; @@ -1043,8 +1046,10 @@ ffs_unmount(mp, mntflags, td) if (error != EOPNOTSUPP) printf("ffs_unmount: ufs_extattr_stop returned %d\n", error); + e_restart = 0; } else { ufs_extattr_uepm_destroy(&ump->um_extattr); + e_restart = 1; } #endif if (susp) { @@ -1121,6 +1126,15 @@ fail: vfs_write_resume(mp); vn_start_write(NULL, &mp, V_WAIT); } +#ifdef UFS_EXTATTR + if (e_restart) { + ufs_extattr_uepm_init(&ump->um_extattr); +#ifdef UFS_EXTATTR_AUTOSTART + (void) ufs_extattr_autostart(mp, td); +#endif + } +#endif + return (error); } |