From patchwork Fri Jan 20 14:29:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geliang Tang X-Patchwork-Id: 9528637 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1A22C60113 for ; Fri, 20 Jan 2017 14:32:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0CBFB28686 for ; Fri, 20 Jan 2017 14:32:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 017B72868E; Fri, 20 Jan 2017 14:32:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B7E2828686 for ; Fri, 20 Jan 2017 14:32:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752663AbdATOcB (ORCPT ); Fri, 20 Jan 2017 09:32:01 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:33990 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752284AbdATOaI (ORCPT ); Fri, 20 Jan 2017 09:30:08 -0500 Received: by mail-pg0-f68.google.com with SMTP id t6so7065930pgt.1; Fri, 20 Jan 2017 06:30:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1dhI0I44iUSw681bvKb/+PCJK6jMJWyE+pVLid7OXdY=; b=VIcAuEOm0FWucImaoaI1JP0C8zwVuKdgsYulP27MYt3KJtga7L46XjA95I6oO3XxiD 87UTAsKn8csvsTkHc+cDlh4xfqvCAUL6DxoI/yiiuAN1YSTWlo122lRVs5ahyNO91lvU ul2oMf3Iui9Vv2lJyuv3UxT37pZRQv9V6h4O9lu7jJTI3Nm+gVHn5+ssjWs//nHNHcIt r1XyTUBt+lREb304ZCYkrL+MkSfR2MYK+vb0yxZvBa77WJn1m/e8lRhFxJtZiPhA5RJb kpxs7OcM51KUjNqfIbpVqjIxl7DXB3Pt2ZrJasgXzvxkoeq8J4lzDp2tw5byg0/l7ypa nchA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1dhI0I44iUSw681bvKb/+PCJK6jMJWyE+pVLid7OXdY=; b=GfdPwJ1IAAhd5MhpC33j9fIcJcYPmdmXOukf6YSasyK8frIGgTptK9l58zopQ/c5Sd YdZYxuTJbAiBzrzrKG9ijOYGE10dVEowSRvauPSxQv16iqjw8Ul0TUz4/c73g3vRTkW9 Atw3QSDP5ZKsl/XQtqzYpjJJnIkwAayuCw+yerIxEk3rSg/taLcwcoPPxn7CMvjcwQXI aTKjedAz9P1hGHs4LwnhSZCtgItxdxNAVyuKxB4OKOIwI8r6Fn4ycsa2IwY/BSkvQim3 mXz76wHXbbRQ5xXuOMIzMFNsKWBLKNJ6RiOMuoKsrjs7VlpzDJnuGMdH8aefYrLGx6cx ViMQ== X-Gm-Message-State: AIkVDXIVhHksBop8Abj3SL3V7nRlv4SuVnvRpA2te/tMpSl3cEH9E7a7xjN+LhwnHeAtKA== X-Received: by 10.99.150.10 with SMTP id c10mr17398911pge.121.1484922607793; Fri, 20 Jan 2017 06:30:07 -0800 (PST) Received: from localhost ([162.211.125.117]) by smtp.gmail.com with ESMTPSA id k76sm17377037pfg.42.2017.01.20.06.30.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Jan 2017 06:30:07 -0800 (PST) From: Geliang Tang To: Alexander Viro Cc: Geliang Tang , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] fs/buffer: use i_blocksize() Date: Fri, 20 Jan 2017 22:29:50 +0800 Message-Id: X-Mailer: git-send-email 2.9.3 In-Reply-To: <0a58b38c7ddfbbc8f56cb8d815114bd4357a6016.1484895399.git.geliangtang@gmail.com> References: <0a58b38c7ddfbbc8f56cb8d815114bd4357a6016.1484895399.git.geliangtang@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since i_blocksize() helper has been defined in fs.h, use it instead of open-coding. Signed-off-by: Geliang Tang --- fs/buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/buffer.c b/fs/buffer.c index 28484b3..53612c4 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -243,7 +243,7 @@ __find_get_block_slow(struct block_device *bdev, sector_t block) printk("b_state=0x%08lx, b_size=%zu\n", bh->b_state, bh->b_size); printk("device %pg blocksize: %d\n", bdev, - 1 << bd_inode->i_blkbits); + i_blocksize(bd_inode)); } out_unlock: spin_unlock(&bd_mapping->private_lock);