OSDN Git Service

xfs: xfs_dir2_block_to_sf temp buffer allocation fails
authorDave Chinner <dchinner@redhat.com>
Tue, 3 Dec 2013 12:50:57 +0000 (23:50 +1100)
committerBen Myers <bpm@sgi.com>
Wed, 11 Dec 2013 20:59:20 +0000 (14:59 -0600)
commitb3f03bac8132207a20286d5602eda64500c19724
tree851ccba3abdaca296a3da9b9a2fb066d4b4ebe61
parentdf8052e7dae00bde6f21b40b6e3e1099770f3afc
xfs: xfs_dir2_block_to_sf temp buffer allocation fails

If we are using a large directory block size, and memory becomes
fragmented, we can get memory allocation failures trying to
kmem_alloc(64k) for a temporary buffer. However, there is not need
for a directory buffer sized allocation, as the end result ends up
in the inode literal area. This is, at most, slightly less than 2k
of space, and hence we don't need an allocation larger than that
fora temporary buffer.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
fs/xfs/xfs_dir2_sf.c