Btrfs: use the inode's mapping mask for allocating pages
authorJosef Bacik <josef@redhat.com>
Wed, 21 Sep 2011 19:05:58 +0000 (15:05 -0400)
committerJosef Bacik <josef@redhat.com>
Wed, 19 Oct 2011 19:12:45 +0000 (15:12 -0400)
commit3b16a4e3c355ee3c790473decfcf83d4faeb8ce0
tree5c3dad941468cf6952623cc18d6b1e682ee3f264
parent455757c322cc0a0f2a692c5625dd88aaf6a7b889
Btrfs: use the inode's mapping mask for allocating pages

Johannes pointed out we were allocating only kernel pages for doing writes,
which is kind of a big deal if you are on 32bit and have more than a gig of ram.
So fix our allocations to use the mapping's gfp but still clear __GFP_FS so we
don't re-enter.  Thanks,

Reported-by: Johannes Weiner <jweiner@redhat.com>
Signed-off-by: Josef Bacik <josef@redhat.com>
fs/btrfs/ctree.h
fs/btrfs/file.c
fs/btrfs/free-space-cache.c
fs/btrfs/inode.c
fs/btrfs/ioctl.c
fs/btrfs/relocation.c