From: keith.busch@intel.com (Keith Busch) Date: Fri, 5 Oct 2018 13:51:36 -0600 Subject: [PATCHv2] nvme/pci: Fix hot removal during error handling In-Reply-To: References: <20181005150927.24120-1-keith.busch@intel.com> Message-ID: <20181005195136.GB24524@localhost.localdomain> On Fri, Oct 05, 2018@11:14:50AM -0700, Sagi Grimberg wrote: > > > - flush_work(&dev->ctrl.reset_work); > > + cancel_work_sync(&dev->ctrl.reset_work); > > Does reset_work requeue itself? if not I don't fully understand > this change. You'd have to abuse the state machine if reset_work wanted to requeue itself, so that shouldn't happen. We could just leave it as a flush work, and that should be okay too. The cancel_work_sync should accomplish the same, but also prevent the work from even starting if it just so happens to have been pending in a work queue, but that seems very unlikely.