From patchwork Sun Oct 18 12:05:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandan Rajendra X-Patchwork-Id: 7429951 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id F2259BEEA4 for ; Sun, 18 Oct 2015 12:06:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 23D34206F1 for ; Sun, 18 Oct 2015 12:06:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3136C206F0 for ; Sun, 18 Oct 2015 12:06:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932075AbbJRMGk (ORCPT ); Sun, 18 Oct 2015 08:06:40 -0400 Received: from e23smtp03.au.ibm.com ([202.81.31.145]:56590 "EHLO e23smtp03.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752843AbbJRMGj (ORCPT ); Sun, 18 Oct 2015 08:06:39 -0400 Received: from /spool/local by e23smtp03.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sun, 18 Oct 2015 22:06:37 +1000 Received: from d23dlp01.au.ibm.com (202.81.31.203) by e23smtp03.au.ibm.com (202.81.31.209) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Sun, 18 Oct 2015 22:06:35 +1000 X-Helo: d23dlp01.au.ibm.com X-MailFrom: chandan@linux.vnet.ibm.com X-RcptTo: linux-btrfs@vger.kernel.org Received: from d23relay08.au.ibm.com (d23relay08.au.ibm.com [9.185.71.33]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id 000BB2CE8050 for ; Sun, 18 Oct 2015 23:06:34 +1100 (EST) Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay08.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t9IC6EWE25428190 for ; Sun, 18 Oct 2015 23:06:22 +1100 Received: from d23av04.au.ibm.com (localhost [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t9IC61ro029527 for ; Sun, 18 Oct 2015 23:06:02 +1100 Received: from localhost.in.ibm.com ([9.79.245.171]) by d23av04.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t9IC5NV6028832; Sun, 18 Oct 2015 23:05:58 +1100 From: Chandan Rajendra To: linux-btrfs@vger.kernel.org Cc: Chandan Rajendra , clm@fb.com, jbacik@fb.com, bo.li.liu@oracle.com, dsterba@suse.cz, quwenruo@cn.fujitsu.com, chandan@mykolab.com Subject: [PATCH V6 10/13] Btrfs: Fix block size returned to user space Date: Sun, 18 Oct 2015 17:35:00 +0530 Message-Id: <1445169903-13915-11-git-send-email-chandan@linux.vnet.ibm.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1445169903-13915-1-git-send-email-chandan@linux.vnet.ibm.com> References: <1445169903-13915-1-git-send-email-chandan@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15101812-0009-0000-0000-00000233BEDC Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP btrfs_getattr() returns PAGE_CACHE_SIZE as the block size. Since generic_fillattr() already does the right thing (by obtaining block size from inode->i_blkbits), just remove the statement from btrfs_getattr. Reviewed-by: Josef Bacik Signed-off-by: Chandan Rajendra --- fs/btrfs/inode.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index c0c83f1..6d145ed 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -9199,7 +9199,6 @@ static int btrfs_getattr(struct vfsmount *mnt, generic_fillattr(inode, stat); stat->dev = BTRFS_I(inode)->root->anon_dev; - stat->blksize = PAGE_CACHE_SIZE; spin_lock(&BTRFS_I(inode)->lock); delalloc_bytes = BTRFS_I(inode)->delalloc_bytes;