xfs: fallback to vmalloc for large buffers in xfs_attrmulti_attr_get
authorDave Chinner <dchinner@redhat.com>
Wed, 7 Mar 2012 04:50:21 +0000 (04:50 +0000)
committerBen Myers <bpm@sgi.com>
Thu, 15 Mar 2012 19:14:33 +0000 (14:14 -0500)
commitad650f5b27bc9858360b42aaa0d9204d16115316
tree9f21fe0fe1589c7cbcbc422f7d4ffcc4cf57bb74
parent6eb2466036358078aed9a65d702cbc97baf0ce65
xfs: fallback to vmalloc for large buffers in xfs_attrmulti_attr_get

xfsdump uses for a large buffer for extended attributes, which has a
kmalloc'd shadow buffer in the kernel. This can fail after the
system has been running for some time as it is a high order
allocation. Add a fallback to vmalloc so that it doesn't require
contiguous memory and so won't randomly fail while xfsdump is
running.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
fs/xfs/xfs_ioctl.c