From: Frederic Weisbecker Date: Fri, 20 Nov 2009 03:11:30 +0000 (+0100) Subject: kill-the-bkl/reiserfs: turn GFP_ATOMIC flag to GFP_NOFS in reiserfs_get_block() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1d2c6cfd40b2dece3bb958cbbc405a2c1536ab75;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git kill-the-bkl/reiserfs: turn GFP_ATOMIC flag to GFP_NOFS in reiserfs_get_block() GFP_ATOMIC was used in reiserfs_get_block to not lose the Bkl so that nobody can modify the tree in the middle of its work. Now that we kicked out the bkl, we can use a more friendly flag. We use GFP_NOFS here because we already hold the reiserfs lock. Signed-off-by: Frederic Weisbecker Cc: Jeff Mahoney Cc: Chris Mason Cc: Ingo Molnar Cc: Alexander Beregalov Cc: Laurent Riffard Cc: Thomas Gleixner --- diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index 0d493a3bb74..3a28e7751b3 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c @@ -932,7 +932,7 @@ int reiserfs_get_block(struct inode *inode, sector_t block, if (blocks_needed == 1) { un = &unf_single; } else { - un = kzalloc(min(blocks_needed, max_to_insert) * UNFM_P_SIZE, GFP_ATOMIC); // We need to avoid scheduling. + un = kzalloc(min(blocks_needed, max_to_insert) * UNFM_P_SIZE, GFP_NOFS); if (!un) { un = &unf_single; blocks_needed = 1;