RE: [PATCH 06/24] mpi3mr: add support of event handling part-1

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

 



> ...
> > + */
> > +void mpi3mr_cleanup_fwevt_list(struct mpi3mr_ioc *mrioc) {
> > +	struct mpi3mr_fwevt *fwevt = NULL;
> > +
> > +	if ((list_empty(&mrioc->fwevt_list) && !mrioc->current_event) ||
> > +	    !mrioc->fwevt_worker_thread || in_interrupt())
> The in_interrup macro is deprecated and should not be used in new code.
> Is it at all possible to call the mpi3mr_cleanup_fwevt_list from
interrupt
> context?

I agree with you. In_interrupt() check is safe to remove. I will take care
while sending V2.

Kashyap
>
> > +		return;
> > +
> > +	while ((fwevt = mpi3mr_dequeue_fwevt(mrioc)) ||
> > +	    (fwevt = mrioc->current_event)) {
> > +		/*
> > +		 * Wait on the fwevt to complete. If this returns 1, then
> > +		 * the event was never executed, and we need a put for the
> > +		 * reference the work had on the fwevt.
> > +		 *
> > +		 * If it did execute, we wait for it to finish, and the
put will
> > +		 * happen from mpi3mr_process_fwevt()
> > +		 */
> > +		if (cancel_work_sync(&fwevt->work)) {
> > +			/*
> > +			 * Put fwevt reference count after
> > +			 * dequeuing it from worker queue
> > +			 */
> > +			mpi3mr_fwevt_put(fwevt);
> > +			/*
> > +			 * Put fwevt reference count to neutralize
> > +			 * kref_init increment
> > +			 */
> > +			mpi3mr_fwevt_put(fwevt);
> > +		}
> > +	}
> > +}

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux