Merge branch 'akpm' (patches from Andrew)
Merge misc updates from Andrew Morton: - a few misc things - most of MM - KASAN updates * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (102 commits) kasan: separate report parts by empty lines kasan: improve double-free report format kasan: print page description after stacks kasan: improve slab object description kasan: change report header kasan: simplify address description logic kasan: change allocation and freeing stack traces headers kasan: unify report headers kasan: introduce helper functions for determining bug type mm: hwpoison: call shake_page() after try_to_unmap() for mlocked page mm: hwpoison: call shake_page() unconditionally mm/swapfile.c: fix swap space leak in error path of swap_free_entries() mm/gup.c: fix access_ok() argument type mm/truncate: avoid pointless cleancache_invalidate_inode() calls. mm/truncate: bail out early from invalidate_inode_pages2_range() if mapping is empty fs/block_dev: always invalidate cleancache in invalidate_bdev() fs: fix data invalidation in the cleancache during direct IO zram: reduce load operation in page_same_filled zram: use zram_free_page instead of open-coded zram: introduce zram data accessor ...
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include <linux/sched.h>
|
||||
#include <linux/sched/clock.h>
|
||||
#include <linux/sched/task.h>
|
||||
#include <linux/sched/mm.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/proc_fs.h>
|
||||
@@ -2876,6 +2877,8 @@ static void __lockdep_trace_alloc(gfp_t gfp_mask, unsigned long flags)
|
||||
if (unlikely(!debug_locks))
|
||||
return;
|
||||
|
||||
gfp_mask = current_gfp_context(gfp_mask);
|
||||
|
||||
/* no reclaim without waiting on it */
|
||||
if (!(gfp_mask & __GFP_DIRECT_RECLAIM))
|
||||
return;
|
||||
@@ -2885,7 +2888,7 @@ static void __lockdep_trace_alloc(gfp_t gfp_mask, unsigned long flags)
|
||||
return;
|
||||
|
||||
/* We're only interested __GFP_FS allocations for now */
|
||||
if (!(gfp_mask & __GFP_FS))
|
||||
if (!(gfp_mask & __GFP_FS) || (curr->flags & PF_MEMALLOC_NOFS))
|
||||
return;
|
||||
|
||||
/*
|
||||
@@ -2894,6 +2897,10 @@ static void __lockdep_trace_alloc(gfp_t gfp_mask, unsigned long flags)
|
||||
if (DEBUG_LOCKS_WARN_ON(irqs_disabled_flags(flags)))
|
||||
return;
|
||||
|
||||
/* Disable lockdep if explicitly requested */
|
||||
if (gfp_mask & __GFP_NOLOCKDEP)
|
||||
return;
|
||||
|
||||
mark_held_locks(curr, RECLAIM_FS);
|
||||
}
|
||||
|
||||
@@ -3947,7 +3954,7 @@ EXPORT_SYMBOL_GPL(lock_unpin_lock);
|
||||
|
||||
void lockdep_set_current_reclaim_state(gfp_t gfp_mask)
|
||||
{
|
||||
current->lockdep_reclaim_gfp = gfp_mask;
|
||||
current->lockdep_reclaim_gfp = current_gfp_context(gfp_mask);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(lockdep_set_current_reclaim_state);
|
||||
|
||||
|
Reference in New Issue
Block a user