Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/jdolecek-ncq]: src/sys/dev/ata ata_free_xfer() must be called with lock ...



details:   https://anonhg.NetBSD.org/src/rev/74cfcd7dc78d
branches:  jdolecek-ncq
changeset: 822908:74cfcd7dc78d
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Mon Apr 24 14:07:29 2017 +0000

description:
ata_free_xfer() must be called with lock held, same as ata_get_xfer()

diffstat:

 sys/dev/ata/wd.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r 5d24b255969f -r 74cfcd7dc78d sys/dev/ata/wd.c
--- a/sys/dev/ata/wd.c  Mon Apr 24 13:24:33 2017 +0000
+++ b/sys/dev/ata/wd.c  Mon Apr 24 14:07:29 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wd.c,v 1.428.2.12 2017/04/24 09:57:22 jdolecek Exp $ */
+/*     $NetBSD: wd.c,v 1.428.2.13 2017/04/24 14:07:29 jdolecek Exp $ */
 
 /*
  * Copyright (c) 1998, 2001 Manuel Bouyer.  All rights reserved.
@@ -54,7 +54,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.428.2.12 2017/04/24 09:57:22 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.428.2.13 2017/04/24 14:07:29 jdolecek Exp $");
 
 #include "opt_ata.h"
 
@@ -826,9 +826,9 @@
        disk_unbusy(&wd->sc_dk, (bp->b_bcount - bp->b_resid),
            (bp->b_flags & B_READ));
        rnd_add_uint32(&wd->rnd_source, bp->b_blkno);
+       ata_free_xfer(wd->drvp->chnl_softc, xfer);
        mutex_exit(&wd->sc_lock);
        biodone(bp);
-       ata_free_xfer(wd->drvp->chnl_softc, xfer);
        wdstart(wd);
 }
 



Home | Main Index | Thread Index | Old Index