From patchwork Mon Jan 31 14:01:02 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Marc-Andr=C3=A9_H=C3=A9bert?= X-Patchwork-Id: 519591 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0VE15Ev000970 for ; Mon, 31 Jan 2011 14:01:05 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755479Ab1AaOBE (ORCPT ); Mon, 31 Jan 2011 09:01:04 -0500 Received: from mail-yw0-f46.google.com ([209.85.213.46]:41477 "EHLO mail-yw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751177Ab1AaOBD (ORCPT ); Mon, 31 Jan 2011 09:01:03 -0500 Received: by ywe10 with SMTP id 10so1970333ywe.19 for ; Mon, 31 Jan 2011 06:01:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=WKMllqBwozAZhji+lDti/c6BY/CbSOosok4SvkCj9xQ=; b=wZdrMgMva3kXUD/2KOy5BQaqU81pj95rxG8RwGtag4a2XOS/2iw+xx7gCkHhvcPNOx 3vFqzGm/EU4xOZbosAFEmayaydZ920VEJ+dY+1dDJ0eEek4d4TBf5eXGxjl2Oxkm6yDR 2uQaI8mZ0mbFKmXcHLZ4xL2TfEUNwSMyQKbXU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=UNpM5q22flUbEN0iKJpL6Is6y6ySU4CgebXqrqZnRmVm5SQlv/iqlJeYoBgoKtBnA8 /YH/jFiMOdmMvI9ibuqLt5G6FM7L91L+3wUWn4/wbF+Jeh/sfRCAwy5/Fd7bBefqQuCB tp9oY2xGe6OWRZFsRtgtZTgKAeMHxdaiVZN0Y= MIME-Version: 1.0 Received: by 10.101.125.16 with SMTP id c16mr3845957ann.210.1296482462810; Mon, 31 Jan 2011 06:01:02 -0800 (PST) Received: by 10.146.84.19 with HTTP; Mon, 31 Jan 2011 06:01:02 -0800 (PST) Date: Mon, 31 Jan 2011 09:01:02 -0500 Message-ID: Subject: Question about read only flag From: =?ISO-8859-1?Q?Marc=2DAndr=E9_H=E9bert?= To: linux-mmc@vger.kernel.org Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 31 Jan 2011 14:01:06 +0000 (UTC) --- a/drivers/mmc/card/block.c 2011-01-31 08:54:56.908952200 -0500 +++ b/drivers/mmc/card/block.c 2011-01-31 08:56:44.175950200 -0500 @@ -621,6 +621,7 @@ md->disk->private_data = md; md->disk->queue = md->queue.queue; md->disk->driverfs_dev = &card->dev; + set_disk_ro(md->disk, md->read_only); /* * As discussed on lkml, GENHD_FL_REMOVABLE should: