Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754217Ab1EYS4v (ORCPT ); Wed, 25 May 2011 14:56:51 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:35994 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751180Ab1EYS4t (ORCPT ); Wed, 25 May 2011 14:56:49 -0400 MIME-Version: 1.0 In-Reply-To: References: <4DDB8BF6.2000304@fusionio.com> <4DDCB1C8.7040708@fusionio.com> From: Linus Torvalds Date: Wed, 25 May 2011 11:55:57 -0700 Message-ID: Subject: Re: [PATCH] SCSI IOCTL: Check for device deletion [was Re: __elv_add_request OOPS] To: Parag Warudkar Cc: Jens Axboe , "linux-kernel@vger.kernel.org" , "James.Bottomley@hansenpartnership.com" , akpm@linux-foundation.org, Linux SCSI List Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 823 Lines: 20 On Wed, May 25, 2011 at 11:44 AM, Parag Warudkar wrote: > > Below patch pushes the check down to ioctl functions and hopefully should > cover more ioctl-on-gone-device cases by returning -ENXIO if an attempt > was made to submit request to a non-running device. Can we please not duplicate complicated logic like that? IOW, just make a helper function for it. That said, isn't this all *exactly* what scsi_prep_state_check() is supposed to check for? Why isn't that called, or if called, why isn't it doing the right thing? Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/