From: Byoungyoung Lee Date: Wed, 25 Mar 2015 03:57:53 +0000 (+1100) Subject: xfs: xfs_mru_cache_insert() should use GFP_NOFS X-Git-Tag: omap-for-v4.1/fixes-rc1~44^2~3^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=20dafeefac97d1a690b113f2a954dc84fdf8f290;p=pandora-kernel.git xfs: xfs_mru_cache_insert() should use GFP_NOFS xfs_mru_cache_insert() can be called from within transaction context during block allocation like so: write(2) .... xfs_get_blocks xfs_iomap_write_direct start transaction xfs_bmapi_write xfs_bmapi_allocate xfs_bmap_btalloc xfs_bmap_btalloc_filestreams xfs_filestream_new_ag xfs_filestream_pick_ag xfs_mru_cache_insert radix_tree_preload(GFP_KERNEL) In this case, GFP_KERNEL is incorrect and can potentially lead to deadlocks in memory reclaim. It should use GFP_NOFS allocations to avoid lock recursion problems. [dchinner: rewrote commit message] Signed-off-by: Byoungyoung Lee Signed-off-by: Sanidhya Kashyap Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner --- Reading git-diff-tree failed