From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Snitzer Subject: Re: dm: check error instead of r in clone_endio Date: Wed, 17 Dec 2014 12:34:43 -0500 Message-ID: <20141217173443.GC27737@redhat.com> References: <54912490.8030808@huawei.com> Reply-To: device-mapper development Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <54912490.8030808@huawei.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: alex chen Cc: device-mapper development , Joseph Qi List-Id: dm-devel.ids On Wed, Dec 17 2014 at 1:37am -0500, alex chen wrote: > In the clone_endio, when target_type is linear and WRITE SAME bio > fails, r will be always be initialized 0 because of null end_io, and > in this case WRITE SAME will not be disabled. > So we should check error instead of r. > > Signed-off-by: Alex Chen I've fixed it a bit differently (clone_endio now matches dm_done) and have staged it for 3.19, see: https://git.kernel.org/cgit/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=for-next&id=5164bece1673cdf04782f8ed3fba70743700f5da Thanks.