kill-the-bkl/reiserfs: turn GFP_ATOMIC flag to GFP_NOFS in reiserfs_get_block()
PATCH 1/1 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 <[email protected]>
Cc Jeff Mahoney <[email protected]>
Cc Chris Mason <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Alexander Beregalov <[email protected]>
Cc Laurent Riffard <[email protected]>
Cc Thomas Gleixner <[email protected]>
--- fs/reiserfs/inode.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
fs/reiserfs/inode.c +1 -1
@@ -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 ;
Signature · 1 line
1.6.2.3