diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2010-07-02 15:49:26 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2010-07-02 15:49:26 +0000 |
commit | bb99f3c9c8e8b6d2a00721577d4706b346345991 (patch) | |
tree | 26eadc88f36ee0a6b9b4837ebe53ba8ef52466ab /sys/dev/softraid_aoe.c | |
parent | ef5674285aba058e036a11279415a3892ab27cd0 (diff) |
Don't timeout_add() when the referenced struct is about to be
discarded. It will eventually fire. Fortunately this file not
yet being used.
ok tedu@.
Diffstat (limited to 'sys/dev/softraid_aoe.c')
-rw-r--r-- | sys/dev/softraid_aoe.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/softraid_aoe.c b/sys/dev/softraid_aoe.c index 431740771a3..5103b10996d 100644 --- a/sys/dev/softraid_aoe.c +++ b/sys/dev/softraid_aoe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid_aoe.c,v 1.16 2010/07/01 19:31:04 thib Exp $ */ +/* $OpenBSD: softraid_aoe.c,v 1.17 2010/07/02 15:49:25 krw Exp $ */ /* * Copyright (c) 2008 Ted Unangst <tedu@openbsd.org> * Copyright (c) 2008 Marco Peereboom <marco@openbsd.org> @@ -382,7 +382,8 @@ sr_send_aoe_chunk(struct sr_workunit *wu, daddr64_t blk, int i) IFQ_ENQUEUE(&ifp->if_snd, m, NULL, rv); if ((ifp->if_flags & IFF_OACTIVE) == 0) (*ifp->if_start)(ifp); - timeout_add_sec(&ar->to, 10); + if (rv == 0) + timeout_add_sec(&ar->to, 10); splx(s); if (rv) { |