Btrfs: Fix block size returned to user space
authorChandan Rajendra <chandan@linux.vnet.ibm.com>
Thu, 21 Jan 2016 10:26:02 +0000 (15:56 +0530)
committerDavid Sterba <dsterba@suse.com>
Mon, 1 Feb 2016 18:24:29 +0000 (19:24 +0100)
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 <jbacik@fb.com>
Signed-off-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c

index 7cda820..8a7c68f 100644 (file)
@@ -9335,7 +9335,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;