From b39e3b8db9fcd432654334cd1cb0b69fc6ebfc3d Mon Sep 17 00:00:00 2001 From: Jag Raman Date: Wed, 22 Mar 2017 15:36:01 -0400 Subject: [PATCH] sparc64: do not dequeue stale VDS IO work entries This change ensures that stale (ones that are marked to be dropped) VDS IO work entries are not dequeued. Orabug: 25455138 Signed-off-by: Jagannathan Raman Reviewed-by: Shannon Nelson Reviewed-by: Bijan Mottahedeh Reviewed-by: Jack Schwartz Signed-off-by: Allen Pais --- drivers/block/vds/vds_io.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/block/vds/vds_io.c b/drivers/block/vds/vds_io.c index 1315cb5fb6cd..b0e397c31e36 100644 --- a/drivers/block/vds/vds_io.c +++ b/drivers/block/vds/vds_io.c @@ -1,7 +1,7 @@ /* * vds_io.c: LDOM Virtual Disk Server. * - * Copyright (C) 2014, 2016 Oracle. All rights reserved. + * Copyright (C) 2014, 2017 Oracle. All rights reserved. */ #include "vds.h" @@ -232,6 +232,9 @@ void vds_io_done(struct vds_io *io) * kernel workqueue AFTER the reset will execute but no response * will be sent to the client. * + * If the request is part of a previously discarded IO queue, do + * not try dequeue it, but just drop it instead. + * * The reset can be initiated by an explicit incoming request * or while processing an IO request. Wakeup anyone waiting on * the IO list in either case. @@ -243,7 +246,10 @@ void vds_io_done(struct vds_io *io) * will resend all requests for which it has received no response. */ vds_vio_lock(vio, flags); - list_del(&io->list); + + if (!(io->flags & VDS_IO_DROP)) + list_del(&io->list); + if (io->flags & VDS_IO_FINI) { list_for_each_safe(pos, tmp, &port->io_list) { ent = list_entry(pos, struct vds_io, list); -- 2.50.1