summaryrefslogtreecommitdiffstats
path: root/lib/idr.c
diff options
context:
space:
mode:
authorMichal Hocko <mhocko@suse.cz>2014-12-29 20:30:35 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-29 21:45:45 +0100
commit45f87de57f8fad59302fd263dd81ffa4843b5b24 (patch)
tree4c92e7d997c86700828c11c1b4b5d247e8b7e9f9 /lib/idr.c
parentLinux 3.19-rc2 (diff)
downloadlinux-45f87de57f8fad59302fd263dd81ffa4843b5b24.tar.xz
linux-45f87de57f8fad59302fd263dd81ffa4843b5b24.zip
mm: get rid of radix tree gfp mask for pagecache_get_page
Commit 2457aec63745 ("mm: non-atomically mark page accessed during page cache allocation where possible") has added a separate parameter for specifying gfp mask for radix tree allocations. Not only this is less than optimal from the API point of view because it is error prone, it is also buggy currently because grab_cache_page_write_begin is using GFP_KERNEL for radix tree and if fgp_flags doesn't contain FGP_NOFS (mostly controlled by fs by AOP_FLAG_NOFS flag) but the mapping_gfp_mask has __GFP_FS cleared then the radix tree allocation wouldn't obey the restriction and might recurse into filesystem and cause deadlocks. This is the case for most filesystems unfortunately because only ext4 and gfs2 are using AOP_FLAG_NOFS. Let's simply remove radix_gfp_mask parameter because the allocation context is same for both page cache and for the radix tree. Just make sure that the radix tree gets only the sane subset of the mask (e.g. do not pass __GFP_WRITE). Long term it is more preferable to convert remaining users of AOP_FLAG_NOFS to use mapping_gfp_mask instead and simplify this interface even further. Reported-by: Dave Chinner <david@fromorbit.com> Signed-off-by: Michal Hocko <mhocko@suse.cz> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib/idr.c')
0 files changed, 0 insertions, 0 deletions