summaryrefslogtreecommitdiff
path: root/sys/kern/vfs_extattr.c
diff options
context:
space:
mode:
authorTor Egge <tegge@FreeBSD.org>2006-09-26 04:15:59 +0000
committerTor Egge <tegge@FreeBSD.org>2006-09-26 04:15:59 +0000
commita1e363f256596cb0165270e82f26d16e7a8aa054 (patch)
tree3bc9361221d5a734023278052dddd20fb2025bee /sys/kern/vfs_extattr.c
parentcea9d840d8ccac1220190eb69b03087cd2c947bd (diff)
downloadsrc-test2-a1e363f256596cb0165270e82f26d16e7a8aa054.tar.gz
src-test2-a1e363f256596cb0165270e82f26d16e7a8aa054.zip
Notes
Diffstat (limited to 'sys/kern/vfs_extattr.c')
-rw-r--r--sys/kern/vfs_extattr.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c
index 147b31e10767..d23f19ba2681 100644
--- a/sys/kern/vfs_extattr.c
+++ b/sys/kern/vfs_extattr.c
@@ -122,7 +122,6 @@ sync(td, uap)
{
struct mount *mp, *nmp;
int vfslocked;
- int asyncflag;
mtx_lock(&mountlist_mtx);
for (mp = TAILQ_FIRST(&mountlist); mp != NULL; mp = nmp) {
@@ -134,13 +133,16 @@ sync(td, uap)
if ((mp->mnt_flag & MNT_RDONLY) == 0 &&
vn_start_write(NULL, &mp, V_NOWAIT) == 0) {
MNT_ILOCK(mp);
- asyncflag = mp->mnt_flag & MNT_ASYNC;
- mp->mnt_flag &= ~MNT_ASYNC;
+ mp->mnt_noasync++;
+ mp->mnt_kern_flag &= ~MNTK_ASYNC;
MNT_IUNLOCK(mp);
vfs_msync(mp, MNT_NOWAIT);
VFS_SYNC(mp, MNT_NOWAIT, td);
MNT_ILOCK(mp);
- mp->mnt_flag |= asyncflag;
+ mp->mnt_noasync--;
+ if ((mp->mnt_flag & MNT_ASYNC) != 0 &&
+ mp->mnt_noasync == 0)
+ mp->mnt_kern_flag |= MNTK_ASYNC;
MNT_IUNLOCK(mp);
vn_finished_write(mp);
}