summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_sync.c
diff options
context:
space:
mode:
authorJan Kara2012-06-06 00:32:26 +0200
committerBen Myers2012-06-21 20:38:25 +0200
commitbcf62ab64d1ba257dd9d4283a077a7219a05073a (patch)
treeb4de28d5e5978de675440e966384f0c4c01ff0e3 /fs/xfs/xfs_sync.c
parentxfs: fix allocbt cursor leak in xfs_alloc_ag_vextent_near (diff)
downloadkernel-qcow2-linux-bcf62ab64d1ba257dd9d4283a077a7219a05073a.tar.gz
kernel-qcow2-linux-bcf62ab64d1ba257dd9d4283a077a7219a05073a.tar.xz
kernel-qcow2-linux-bcf62ab64d1ba257dd9d4283a077a7219a05073a.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 <dchinner@redhat.com> Signed-off-by: Jan Kara <jack@suse.cz> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_sync.c')
0 files changed, 0 insertions, 0 deletions