Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7a92cc6b authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'akpm' (patches from Andrew)

Merge fixes from Andrew Morton:
 "8 fixes"

* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
  mm, fs: check for fatal signals in do_generic_file_read()
  fs: break out of iomap_file_buffered_write on fatal signals
  base/memory, hotplug: fix a kernel oops in show_valid_zones()
  mm/memory_hotplug.c: check start_pfn in test_pages_in_a_zone()
  jump label: pass kbuild_cflags when checking for asm goto support
  shmem: fix sleeping from atomic context
  kasan: respect /proc/sys/kernel/traceoff_on_warning
  zswap: disable changing params if init fails
parents 3f67790d 5abf186a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -797,7 +797,7 @@ KBUILD_CFLAGS += $(call cc-option,-Werror=incompatible-pointer-types)
KBUILD_ARFLAGS := $(call ar-option,D)

# check for 'asm goto'
ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-goto.sh $(CC)), y)
ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-goto.sh $(CC) $(KBUILD_CFLAGS)), y)
	KBUILD_CFLAGS += -DCC_HAVE_ASM_GOTO
	KBUILD_AFLAGS += -DCC_HAVE_ASM_GOTO
endif
+6 −6
Original line number Diff line number Diff line
@@ -389,33 +389,33 @@ static ssize_t show_valid_zones(struct device *dev,
{
	struct memory_block *mem = to_memory_block(dev);
	unsigned long start_pfn, end_pfn;
	unsigned long valid_start, valid_end, valid_pages;
	unsigned long nr_pages = PAGES_PER_SECTION * sections_per_block;
	struct page *first_page;
	struct zone *zone;
	int zone_shift = 0;

	start_pfn = section_nr_to_pfn(mem->start_section_nr);
	end_pfn = start_pfn + nr_pages;
	first_page = pfn_to_page(start_pfn);

	/* The block contains more than one zone can not be offlined. */
	if (!test_pages_in_a_zone(start_pfn, end_pfn))
	if (!test_pages_in_a_zone(start_pfn, end_pfn, &valid_start, &valid_end))
		return sprintf(buf, "none\n");

	zone = page_zone(first_page);
	zone = page_zone(pfn_to_page(valid_start));
	valid_pages = valid_end - valid_start;

	/* MMOP_ONLINE_KEEP */
	sprintf(buf, "%s", zone->name);

	/* MMOP_ONLINE_KERNEL */
	zone_can_shift(start_pfn, nr_pages, ZONE_NORMAL, &zone_shift);
	zone_can_shift(valid_start, valid_pages, ZONE_NORMAL, &zone_shift);
	if (zone_shift) {
		strcat(buf, " ");
		strcat(buf, (zone + zone_shift)->name);
	}

	/* MMOP_ONLINE_MOVABLE */
	zone_can_shift(start_pfn, nr_pages, ZONE_MOVABLE, &zone_shift);
	zone_can_shift(valid_start, valid_pages, ZONE_MOVABLE, &zone_shift);
	if (zone_shift) {
		strcat(buf, " ");
		strcat(buf, (zone + zone_shift)->name);
+5 −0
Original line number Diff line number Diff line
@@ -1031,6 +1031,11 @@ dax_iomap_actor(struct inode *inode, loff_t pos, loff_t length, void *data,
		struct blk_dax_ctl dax = { 0 };
		ssize_t map_len;

		if (fatal_signal_pending(current)) {
			ret = -EINTR;
			break;
		}

		dax.sector = dax_iomap_sector(iomap, pos);
		dax.size = (length + offset + PAGE_SIZE - 1) & PAGE_MASK;
		map_len = dax_map_atomic(iomap->bdev, &dax);
+3 −0
Original line number Diff line number Diff line
@@ -114,6 +114,9 @@ iomap_write_begin(struct inode *inode, loff_t pos, unsigned len, unsigned flags,

	BUG_ON(pos + len > iomap->offset + iomap->length);

	if (fatal_signal_pending(current))
		return -EINTR;

	page = grab_cache_page_write_begin(inode->i_mapping, index, flags);
	if (!page)
		return -ENOMEM;
+2 −1
Original line number Diff line number Diff line
@@ -85,7 +85,8 @@ extern int zone_grow_waitqueues(struct zone *zone, unsigned long nr_pages);
extern int add_one_highpage(struct page *page, int pfn, int bad_ppro);
/* VM interface that may be used by firmware interface */
extern int online_pages(unsigned long, unsigned long, int);
extern int test_pages_in_a_zone(unsigned long, unsigned long);
extern int test_pages_in_a_zone(unsigned long start_pfn, unsigned long end_pfn,
	unsigned long *valid_start, unsigned long *valid_end);
extern void __offline_isolated_pages(unsigned long, unsigned long);

typedef void (*online_page_callback_t)(struct page *page);
Loading