[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BANLkTimWPWc4k2_q0KZpmWo9G93UmVWoxA@mail.gmail.com>
Date: Wed, 25 May 2011 13:03:38 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Parag Warudkar <parag.lkml@...il.com>
Cc: Jens Axboe <jaxboe@...ionio.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"James.Bottomley@...senpartnership.com"
<James.Bottomley@...senpartnership.com>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
Linux SCSI List <linux-scsi@...r.kernel.org>
Subject: Re: [PATCH] SCSI IOCTL: Check for device deletion [was Re:
__elv_add_request OOPS]
On Wed, May 25, 2011 at 12:52 PM, Parag Warudkar <parag.lkml@...il.com> wrote:
>
> +static inline int sdev_early_check(struct scsi_device *sdev)
> +{
> + if (!sdev || sdev->sdev_state == SDEV_DEL
> + || sdev->sdev_state > SDEV_QUIESCE)
> + return -ENXIO;
> + return 0;
> +}
Can somebody explain why it's those states, and nothing else?
Quite frankly, if it's about "don't oops on sdev->queue not existing",
then test for that. Not for some random and uncommented list of
states.
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists