Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754445Ab1BMOL0 (ORCPT ); Sun, 13 Feb 2011 09:11:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51914 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753967Ab1BMOLU (ORCPT ); Sun, 13 Feb 2011 09:11:20 -0500 Message-ID: <4D57E67E.1030707@redhat.com> Date: Sun, 13 Feb 2011 15:11:10 +0100 From: Milan Broz User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101213 Thunderbird/3.1.7 MIME-Version: 1.0 To: Tao Ma CC: linux-kernel@vger.kernel.org, Jens Axboe , Tejun Heo Subject: Re: [PATCH] loop: clear read-only flag in loop_clr_fd. References: <4D573BBB.6090200@redhat.com> <1297594735-5593-1-git-send-email-tm@tao.ma> In-Reply-To: <1297594735-5593-1-git-send-email-tm@tao.ma> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 805 Lines: 21 On 02/13/2011 11:58 AM, Tao Ma wrote: > From: Tao Ma > > In 75f1dc0, we check bdev_read_only() from blkdev_get(). > But the loop_clr_fd doesn't clear the read only flag. > What cause a error if we changing a loop device from > read only to writable. No, sorry, this is not proper/complete fix. It fixes it for loop (and even not completely - you are missing some error paths and ignoring autoclear mode where you have bdev NULL.) (And yes, I tried the same as workaround.) And it will not help for DM case (and possibly others). Milan -- 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/