mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 12:11:40 +00:00
mm: mmap_lock: fix disabling preemption directly
Commit832b507253
("mm: mmap_lock: use local locks instead of disabling preemption") fixed a bug by using local locks. But commitd01079f3d0
("mm/mmap_lock: remove dead code for !CONFIG_TRACING configurations") changed those lines back to the original version. I guess it was introduced by fixing conflicts. Link: https://lkml.kernel.org/r/20210720074228.76342-1-songmuchun@bytedance.com Fixes:d01079f3d0
("mm/mmap_lock: remove dead code for !CONFIG_TRACING configurations") Signed-off-by: Muchun Song <songmuchun@bytedance.com> Acked-by: Mel Gorman <mgorman@techsingularity.net> Reviewed-by: Yang Shi <shy828301@gmail.com> Reviewed-by: Pankaj Gupta <pankaj.gupta@ionos.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
af64237461
commit
e904c2ccf9
@ -156,14 +156,14 @@ static inline void put_memcg_path_buf(void)
|
||||
#define TRACE_MMAP_LOCK_EVENT(type, mm, ...) \
|
||||
do { \
|
||||
const char *memcg_path; \
|
||||
preempt_disable(); \
|
||||
local_lock(&memcg_paths.lock); \
|
||||
memcg_path = get_mm_memcg_path(mm); \
|
||||
trace_mmap_lock_##type(mm, \
|
||||
memcg_path != NULL ? memcg_path : "", \
|
||||
##__VA_ARGS__); \
|
||||
if (likely(memcg_path != NULL)) \
|
||||
put_memcg_path_buf(); \
|
||||
preempt_enable(); \
|
||||
local_unlock(&memcg_paths.lock); \
|
||||
} while (0)
|
||||
|
||||
#else /* !CONFIG_MEMCG */
|
||||
|
Loading…
Reference in New Issue
Block a user