Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 11 Nov 2002 18:16:13 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 11 Nov 2002 18:16:13 -0500 Received: from leibniz.math.psu.edu ([146.186.130.2]:13768 "EHLO math.psu.edu") by vger.kernel.org with ESMTP id ; Mon, 11 Nov 2002 18:16:12 -0500 Date: Mon, 11 Nov 2002 18:23:00 -0500 (EST) From: Alexander Viro To: Bernd Eckenfels cc: dm@uk.sistina.com, linux-lvm@sistina.com, linux-kernel@vger.kernel.org Subject: Re: [patch] make device mapper compile on 2.5.4x In-Reply-To: <20021111225340.GA3587@lina.inka.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 680 Lines: 20 On Mon, 11 Nov 2002, Bernd Eckenfels wrote: > - set_device_ro(dm_kdev(md), 0/*(param->flags & DM_READONLY_FLAG)*/); > + bdev = bdget(kdev_t_to_nr(dm_kdev(md))); > + if (!bdev) > + return -ENXIO; > + set_device_ro(bdev, (param->flags & DM_READONLY_FLAG)); > + bdput(bdev); That is simply wrong. set_device_ro() works only on opened block_device. Correct fix is to use set_disk_ro() and it's already in the tree (1.830 on bkbits). - 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/