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

Commit 09b913ee authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Merge android-4.14 (73421a43) into msm-4.14"

parents 7e6c0c07 5c033b48
Loading
Loading
Loading
Loading
+626 −0

File added.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Diff line number Diff line
@@ -276,7 +276,7 @@ static ssize_t keychord_write(struct file *file, const char __user *buffer,
	size_t resid = count;
	size_t key_bytes;

	if (count < sizeof(struct input_keychord))
	if (count < sizeof(struct input_keychord) || count > PAGE_SIZE)
		return -EINVAL;
	keychords = kzalloc(count, GFP_KERNEL);
	if (!keychords)
+5 −5
Original line number Diff line number Diff line
@@ -548,14 +548,14 @@ static int adjoin(struct dm_table *table, struct dm_target *ti)
 * On the other hand, dm-switch needs to process bulk data using messages and
 * excessive use of GFP_NOIO could cause trouble.
 */
static char **realloc_argv(unsigned *array_size, char **old_argv)
static char **realloc_argv(unsigned *size, char **old_argv)
{
	char **argv;
	unsigned new_size;
	gfp_t gfp;

	if (*array_size) {
		new_size = *array_size * 2;
	if (*size) {
		new_size = *size * 2;
		gfp = GFP_KERNEL;
	} else {
		new_size = 8;
@@ -563,8 +563,8 @@ static char **realloc_argv(unsigned *array_size, char **old_argv)
	}
	argv = kmalloc(new_size * sizeof(*argv), gfp);
	if (argv) {
		memcpy(argv, old_argv, *array_size * sizeof(*argv));
		*array_size = new_size;
		memcpy(argv, old_argv, *size * sizeof(*argv));
		*size = new_size;
	}

	kfree(old_argv);
+4 −15
Original line number Diff line number Diff line
@@ -3819,8 +3819,8 @@ int btree_write_cache_pages(struct address_space *mapping,
	if (wbc->sync_mode == WB_SYNC_ALL)
		tag_pages_for_writeback(mapping, index, end);
	while (!done && !nr_to_write_done && (index <= end) &&
	       (nr_pages = pagevec_lookup_tag(&pvec, mapping, &index, tag,
			min(end - index, (pgoff_t)PAGEVEC_SIZE-1) + 1))) {
	       (nr_pages = pagevec_lookup_range_tag(&pvec, mapping, &index, end,
			tag))) {
		unsigned i;

		scanned = 1;
@@ -3830,11 +3830,6 @@ int btree_write_cache_pages(struct address_space *mapping,
			if (!PagePrivate(page))
				continue;

			if (!wbc->range_cyclic && page->index > end) {
				done = 1;
				break;
			}

			spin_lock(&mapping->private_lock);
			if (!PagePrivate(page)) {
				spin_unlock(&mapping->private_lock);
@@ -3966,8 +3961,8 @@ static int extent_write_cache_pages(struct address_space *mapping,
		tag_pages_for_writeback(mapping, index, end);
	done_index = index;
	while (!done && !nr_to_write_done && (index <= end) &&
	       (nr_pages = pagevec_lookup_tag(&pvec, mapping, &index, tag,
			min(end - index, (pgoff_t)PAGEVEC_SIZE-1) + 1))) {
			(nr_pages = pagevec_lookup_range_tag(&pvec, mapping,
						&index, end, tag))) {
		unsigned i;

		scanned = 1;
@@ -3992,12 +3987,6 @@ static int extent_write_cache_pages(struct address_space *mapping,
				continue;
			}

			if (!wbc->range_cyclic && page->index > end) {
				done = 1;
				unlock_page(page);
				continue;
			}

			if (wbc->sync_mode != WB_SYNC_NONE) {
				if (PageWriteback(page))
					flush_fn(data);
+5 −21
Original line number Diff line number Diff line
@@ -870,15 +870,10 @@ static int ceph_writepages_start(struct address_space *mapping,
		max_pages = wsize >> PAGE_SHIFT;

get_more_pages:
		pvec_pages = min_t(unsigned, PAGEVEC_SIZE,
		pvec_pages = pagevec_lookup_range_nr_tag(&pvec, mapping, &index,
						end, PAGECACHE_TAG_DIRTY,
						max_pages - locked_pages);
		if (end - index < (u64)(pvec_pages - 1))
			pvec_pages = (unsigned)(end - index) + 1;

		pvec_pages = pagevec_lookup_tag(&pvec, mapping, &index,
						PAGECACHE_TAG_DIRTY,
						pvec_pages);
		dout("pagevec_lookup_tag got %d\n", pvec_pages);
		dout("pagevec_lookup_range_tag got %d\n", pvec_pages);
		if (!pvec_pages && !locked_pages)
			break;
		for (i = 0; i < pvec_pages && locked_pages < max_pages; i++) {
@@ -896,16 +891,6 @@ static int ceph_writepages_start(struct address_space *mapping,
				unlock_page(page);
				continue;
			}
			if (page->index > end) {
				dout("end of range %p\n", page);
				/* can't be range_cyclic (1st pass) because
				 * end == -1 in that case. */
				stop = true;
				if (ceph_wbc.head_snapc)
					done = true;
				unlock_page(page);
				break;
			}
			if (strip_unit_end && (page->index > strip_unit_end)) {
				dout("end of strip unit %p\n", page);
				unlock_page(page);
@@ -1177,8 +1162,7 @@ static int ceph_writepages_start(struct address_space *mapping,
			index = 0;
			while ((index <= end) &&
			       (nr = pagevec_lookup_tag(&pvec, mapping, &index,
							PAGECACHE_TAG_WRITEBACK,
							PAGEVEC_SIZE))) {
						PAGECACHE_TAG_WRITEBACK))) {
				for (i = 0; i < nr; i++) {
					page = pvec.pages[i];
					if (page_snap_context(page) != snapc)
Loading