NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/38460: fstrans_start code in genfs_do_putpages is racy
The following reply was made to PR kern/38460; it has been noted by GNATS.
From: Juergen Hannken-Illjes <hannken%eis.cs.tu-bs.de@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: kern-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
netbsd-bugs%netbsd.org@localhost
Subject: Re: kern/38460: fstrans_start code in genfs_do_putpages is racy
Date: Sat, 19 Apr 2008 11:45:04 +0200
On Sat, Apr 19, 2008 at 08:05:00AM +0000, yamt%mwd.biglobe.ne.jp@localhost
wrote:
> >Synopsis: fstrans_start code in genfs_do_putpages is racy
This diff should fix it. Ok?
--
Juergen Hannken-Illjes - hannken%eis.cs.tu-bs.de@localhost - TU Braunschweig
(Germany)
Index: genfs_io.c
===================================================================
RCS file: /cvsroot/src/sys/miscfs/genfs/genfs_io.c,v
retrieving revision 1.5
diff -p -u -2 -r1.5 genfs_io.c
--- genfs_io.c 18 Jan 2008 11:01:23 -0000 1.5
+++ genfs_io.c 19 Apr 2008 09:38:14 -0000
@@ -779,7 +779,8 @@ genfs_do_putpages(struct vnode *vp, off_
vp, uobj->uo_npages, startoff, endoff - startoff);
+ has_trans = false;
+
retry:
modified = false;
- has_trans = false;
flags = origflags;
KASSERT((vp->v_iflag & VI_ONWORKLST) != 0 ||
@@ -791,4 +792,6 @@ retry:
vn_syncer_remove_from_worklist(vp);
}
+ if (has_trans)
+ fstrans_done(vp->v_mount);
mutex_exit(slock);
return (0);
@@ -799,5 +802,5 @@ retry:
*/
- if ((flags & PGO_CLEANIT) != 0) {
+ if (!has_trans && (flags & PGO_CLEANIT) != 0) {
mutex_exit(slock);
if (pagedaemon) {
@@ -809,4 +812,5 @@ retry:
has_trans = true;
mutex_enter(slock);
+ goto retry;
}
Home |
Main Index |
Thread Index |
Old Index