aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jbd2/commit.c
diff options
context:
space:
mode:
authorJan Kara <[email protected]>2012-06-05 22:32:26 +0000
committerBen Myers <[email protected]>2012-06-21 19:20:36 +0000
commit59c84ed0ddc11f1823b4a33ace4fbcc948261bb2 (patch)
tree32d64523ae5c46b4959876a3d6b498adb6452dbc /fs/jbd2/commit.c
parentxfs: fix allocbt cursor leak in xfs_alloc_ag_vextent_near (diff)
downloadkernel-59c84ed0ddc11f1823b4a33ace4fbcc948261bb2.tar.gz
kernel-59c84ed0ddc11f1823b4a33ace4fbcc948261bb2.zip
xfs: Fix overallocation in xfs_buf_allocate_memory()
Commit de1cbee which removed b_file_offset in favor of b_bn introduced a bug causing xfs_buf_allocate_memory() to overestimate the number of necessary pages. The problem is that xfs_buf_alloc() sets b_bn to -1 and thus effectively every buffer is straddling a page boundary which causes xfs_buf_allocate_memory() to allocate two pages and use vmalloc() for access which is unnecessary. Dave says xfs_buf_alloc() doesn't need to set b_bn to -1 anymore since the buffer is inserted into the cache only after being fully initialized now. So just make xfs_buf_alloc() fill in proper block number from the beginning. CC: David Chinner <[email protected]> Signed-off-by: Jan Kara <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Dave Chinner <[email protected]> Signed-off-by: Ben Myers <[email protected]>
Diffstat (limited to 'fs/jbd2/commit.c')
0 files changed, 0 insertions, 0 deletions