Remove BKL removal patches, since they don't seem to be portable on
[ext4-patch-queue.git] / jbd-blocks-reservation-fix-for-large-blk.patch
blobf51bf9522d60e7f61f247aee76937a8bb9df166f
1 jbd: blocks reservation fix for large block support
3 From: Mingming Cao <cmm@us.ibm.com>
5 The blocks per page could be less or quals to 1 with the large
6 block support in VM. The patch fixed the way to calculate the
7 number of blocks to reserve in journal in the case blocksize > pagesize.
9 Signed-off-by: Mingming Cao <cmm@us.ibm.com>
10 ---
12 fs/jbd/journal.c | 7 ++++++-
13 1 files changed, 6 insertions(+), 1 deletions(-)
16 diff --git a/fs/jbd/journal.c b/fs/jbd/journal.c
17 index 5d14243..7b32029 100644
18 --- a/fs/jbd/journal.c
19 +++ b/fs/jbd/journal.c
20 @@ -1604,7 +1604,12 @@ void journal_ack_err(journal_t *journal)
22 int journal_blocks_per_page(struct inode *inode)
24 - return 1 << (PAGE_CACHE_SHIFT - inode->i_sb->s_blocksize_bits);
25 + int bits = PAGE_CACHE_SHIFT - inode->i_sb->s_blocksize_bits;
27 + if (bits > 0)
28 + return 1 << bits;
29 + else
30 + return 1;