Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ocfs2: Use GFP_NOFS in kmalloc during localalloc window move

kmalloc() during a localalloc window move can trigger the mm to prune
the dcache which inturn can trigger the fs to delete an inode causing
it start a recursive transaction.

The fix also makes the change in kmalloc during localalloc shutdown
just to be safe.

Fixes oss bugzilla#901
http://oss.oracle.com/bugzilla/show_bug.cgi?id=901

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>

authored by

Sunil Mushran and committed by
Mark Fasheh
4ba1c5bf bc535809

+2 -2
+2 -2
fs/ocfs2/localalloc.c
··· 260 260 bh = osb->local_alloc_bh; 261 261 alloc = (struct ocfs2_dinode *) bh->b_data; 262 262 263 - alloc_copy = kmalloc(bh->b_size, GFP_KERNEL); 263 + alloc_copy = kmalloc(bh->b_size, GFP_NOFS); 264 264 if (!alloc_copy) { 265 265 status = -ENOMEM; 266 266 goto out_commit; ··· 931 931 * local alloc shutdown won't try to double free main bitmap 932 932 * bits. Make a copy so the sync function knows which bits to 933 933 * free. */ 934 - alloc_copy = kmalloc(osb->local_alloc_bh->b_size, GFP_KERNEL); 934 + alloc_copy = kmalloc(osb->local_alloc_bh->b_size, GFP_NOFS); 935 935 if (!alloc_copy) { 936 936 status = -ENOMEM; 937 937 mlog_errno(status);