Commit 03b18887 authored by Heinz Mauelshagen's avatar Heinz Mauelshagen Committed by Mike Snitzer
Browse files

dm: fix trailing statements

parent 43be9c74
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -357,8 +357,7 @@ static int flakey_map(struct dm_target *ti, struct bio *bio)
		if (test_bit(DROP_WRITES, &fc->flags)) {
			bio_endio(bio);
			return DM_MAPIO_SUBMITTED;
		}
		else if (test_bit(ERROR_WRITES, &fc->flags)) {
		} else if (test_bit(ERROR_WRITES, &fc->flags)) {
			bio_io_error(bio);
			return DM_MAPIO_SUBMITTED;
		}
+28 −26
Original line number Diff line number Diff line
@@ -679,7 +679,8 @@ static bool block_bitmap_op(struct dm_integrity_c *ic, struct page_list *bitmap,
	} else if (mode == BITMAP_OP_CLEAR) {
		if (!bit && this_end_bit == PAGE_SIZE * 8 - 1)
			clear_page(data);
		else while (bit <= this_end_bit) {
		else {
			while (bit <= this_end_bit) {
				if (!(bit % BITS_PER_LONG) && this_end_bit >= bit + BITS_PER_LONG - 1) {
					do {
						data[bit / BITS_PER_LONG] = 0;
@@ -690,6 +691,7 @@ static bool block_bitmap_op(struct dm_integrity_c *ic, struct page_list *bitmap,
				__clear_bit(bit, data);
				bit++;
			}
		}
	} else {
		BUG();
	}
@@ -2010,7 +2012,8 @@ static bool __journal_read_write(struct dm_integrity_io *dio, struct bio *bio,
				unsigned int tag_todo = ic->tag_size;
				char *tag_ptr = journal_entry_tag(ic, je);

				if (bip) do {
				if (bip) {
					do {
						struct bio_vec biv = bvec_iter_bvec(bip->bip_vec, bip->bip_iter);
						unsigned int tag_now = min(biv.bv_len, tag_todo);
						char *tag_addr;
@@ -2023,11 +2026,10 @@ static bool __journal_read_write(struct dm_integrity_io *dio, struct bio *bio,
						bvec_iter_advance(bip->bip_vec, &bip->bip_iter, tag_now);
						tag_ptr += tag_now;
						tag_todo -= tag_now;
				} while (unlikely(tag_todo)); else {
					if (likely(dio->op == REQ_OP_WRITE))
					} while (unlikely(tag_todo));
				} else if (likely(dio->op == REQ_OP_WRITE))
					memset(tag_ptr, 0, tag_todo);
			}
			}

			if (likely(dio->op == REQ_OP_WRITE)) {
				struct journal_sector *js;
+14 −12
Original line number Diff line number Diff line
@@ -359,7 +359,8 @@ static void do_region(const blk_opf_t opf, unsigned int region,
			num_sectors = min_t(sector_t, special_cmd_max_sectors, remaining);
			bio->bi_iter.bi_size = num_sectors << SECTOR_SHIFT;
			remaining -= num_sectors;
		} else while (remaining) {
		} else {
			while (remaining) {
				/*
				 * Try and add as many pages as possible.
				 */
@@ -372,6 +373,7 @@ static void do_region(const blk_opf_t opf, unsigned int region,
				remaining -= to_sector(len);
				dp->next_page(dp);
			}
		}

		atomic_inc(&io->count);
		submit_bio(bio);
+11 −9
Original line number Diff line number Diff line
@@ -518,7 +518,8 @@ static int read_exceptions(struct pstore *ps,
		if (unlikely(prefetch_area < ps->current_area))
			prefetch_area = ps->current_area;

		if (DM_PREFETCH_CHUNKS) do {
		if (DM_PREFETCH_CHUNKS) {
			do {
				chunk_t pf_chunk = area_location(ps, prefetch_area);
				if (unlikely(pf_chunk >= dm_bufio_get_device_size(client)))
					break;
@@ -527,6 +528,7 @@ static int read_exceptions(struct pstore *ps,
				if (unlikely(!prefetch_area))
					break;
			} while (prefetch_area <= ps->current_area + DM_PREFETCH_CHUNKS);
		}

		chunk = area_location(ps, ps->current_area);

+1 −2
Original line number Diff line number Diff line
@@ -2345,8 +2345,7 @@ static void snapshot_status(struct dm_target *ti, status_type_t type,
				       (unsigned long long)sectors_allocated,
				       (unsigned long long)total_sectors,
				       (unsigned long long)metadata_sectors);
			}
			else
			} else
				DMEMIT("Unknown");
		}

Loading