aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/locking/lockdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/locking/lockdep.c')
-rw-r--r--kernel/locking/lockdep.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index f84294c9a018..fd440b5a3c75 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -2877,7 +2877,7 @@ static void __lockdep_trace_alloc(gfp_t gfp_mask, unsigned long flags)
2877 if (unlikely(!debug_locks)) 2877 if (unlikely(!debug_locks))
2878 return; 2878 return;
2879 2879
2880 gfp_mask = memalloc_noio_flags(gfp_mask); 2880 gfp_mask = current_gfp_context(gfp_mask);
2881 2881
2882 /* no reclaim without waiting on it */ 2882 /* no reclaim without waiting on it */
2883 if (!(gfp_mask & __GFP_DIRECT_RECLAIM)) 2883 if (!(gfp_mask & __GFP_DIRECT_RECLAIM))
@@ -2888,7 +2888,7 @@ static void __lockdep_trace_alloc(gfp_t gfp_mask, unsigned long flags)
2888 return; 2888 return;
2889 2889
2890 /* We're only interested __GFP_FS allocations for now */ 2890 /* We're only interested __GFP_FS allocations for now */
2891 if (!(gfp_mask & __GFP_FS)) 2891 if (!(gfp_mask & __GFP_FS) || (curr->flags & PF_MEMALLOC_NOFS))
2892 return; 2892 return;
2893 2893
2894 /* 2894 /*
@@ -3954,7 +3954,7 @@ EXPORT_SYMBOL_GPL(lock_unpin_lock);
3954 3954
3955void lockdep_set_current_reclaim_state(gfp_t gfp_mask) 3955void lockdep_set_current_reclaim_state(gfp_t gfp_mask)
3956{ 3956{
3957 current->lockdep_reclaim_gfp = memalloc_noio_flags(gfp_mask); 3957 current->lockdep_reclaim_gfp = current_gfp_context(gfp_mask);
3958} 3958}
3959 3959
3960void lockdep_clear_current_reclaim_state(void) 3960void lockdep_clear_current_reclaim_state(void)