From patchwork Tue Jun 7 17:35:42 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Rees X-Patchwork-Id: 858762 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 p57HZsod022911 for ; Tue, 7 Jun 2011 17:35:54 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756815Ab1FGRfs (ORCPT ); Tue, 7 Jun 2011 13:35:48 -0400 Received: from int-mailstore01.merit.edu ([207.75.116.232]:44101 "EHLO int-mailstore01.merit.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756044Ab1FGRfs (ORCPT ); Tue, 7 Jun 2011 13:35:48 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by int-mailstore01.merit.edu (Postfix) with ESMTP id B41B630852D6; Tue, 7 Jun 2011 13:35:47 -0400 (EDT) X-Virus-Scanned: amavisd-new at int-mailstore01.merit.edu Received: from int-mailstore01.merit.edu ([127.0.0.1]) by localhost (int-mailstore01.merit.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JdYpns1-T8EZ; Tue, 7 Jun 2011 13:35:47 -0400 (EDT) Received: from merit.edu (host-17.subnet-17.med.umich.edu [141.214.17.17]) by int-mailstore01.merit.edu (Postfix) with ESMTPSA id CE58230852D5; Tue, 7 Jun 2011 13:35:46 -0400 (EDT) Date: Tue, 7 Jun 2011 13:35:42 -0400 From: Jim Rees To: Benny Halevy Cc: linux-nfs@vger.kernel.org, peter honeyman Subject: [PATCH 84/88] pnfs-block: fix blocklayoutdev.c for new blkdev_get_by_dev() Message-ID: <749b82c976b5056af3ab7818eef4952c07d3ecba.1307464382.git.rees@umich.edu> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@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]); Tue, 07 Jun 2011 17:35:54 +0000 (UTC) blkdev_get has been replaced by blkdev_get_by_dev in 2.6.38, which now handles exclusive use too (which we don't use). Fix uses in blocklayout to match. Signed-off-by: Jim Rees Signed-off-by: Benny Halevy --- fs/nfs/blocklayout/blocklayoutdev.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/fs/nfs/blocklayout/blocklayoutdev.c b/fs/nfs/blocklayout/blocklayoutdev.c index 17bd25a..23469e3 100644 --- a/fs/nfs/blocklayout/blocklayoutdev.c +++ b/fs/nfs/blocklayout/blocklayoutdev.c @@ -55,7 +55,7 @@ struct block_device *nfs4_blkdev_get(dev_t dev) struct block_device *bd; dprintk("%s enter\n", __func__); - bd = open_by_devnum(dev, FMODE_READ); + bd = blkdev_get_by_dev(dev, FMODE_READ, NULL); if (IS_ERR(bd)) goto fail; return bd; @@ -72,7 +72,6 @@ int nfs4_blkdev_put(struct block_device *bdev) { dprintk("%s for device %d:%d\n", __func__, MAJOR(bdev->bd_dev), MINOR(bdev->bd_dev)); - bd_release(bdev); return blkdev_put(bdev, FMODE_READ); }