Btrfs: btrfs_page_mkwrite: Reserve space in sectorsized units
authorChandan Rajendra <chandan@linux.vnet.ibm.com>
Thu, 21 Jan 2016 10:25:57 +0000 (15:55 +0530)
committerDavid Sterba <dsterba@suse.com>
Mon, 1 Feb 2016 18:24:29 +0000 (19:24 +0100)
commitd0b7da88f6409c740435712b092a8e2c7d2a8f74
treee46c6e2d75f7290188e4bec6d9f37b119aaff554
parent9703fefe0b137bb4475187b5d82ec5823445616b
Btrfs: btrfs_page_mkwrite: Reserve space in sectorsized units

In subpagesize-blocksize scenario, if i_size occurs in a block which is not
the last block in the page, then the space to be reserved should be calculated
appropriately.

Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c