Commit c96b8b22 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe
Browse files

iomap: rename IOMAP_DIO_DIRTY to IOMAP_DIO_USER_BACKED



Match the more descriptive iov_iter terminology instead of encoding
what we do with them for reads only.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDamien Le Moal <dlemoal@kernel.org>
Reviewed-by: default avatarDarrick J. Wong <djwong@kernel.org>
Tested-by: default avatarAnuj Gupta <anuj20.g@samsung.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 45cec0de
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@
#define IOMAP_DIO_WRITE_THROUGH	(1U << 28)
#define IOMAP_DIO_NEED_SYNC	(1U << 29)
#define IOMAP_DIO_WRITE		(1U << 30)
#define IOMAP_DIO_DIRTY		(1U << 31)
#define IOMAP_DIO_USER_BACKED	(1U << 31)

struct iomap_dio {
	struct kiocb		*iocb;
@@ -215,7 +215,7 @@ static void __iomap_dio_bio_end_io(struct bio *bio, bool inline_completion)
{
	struct iomap_dio *dio = bio->bi_private;

	if (dio->flags & IOMAP_DIO_DIRTY) {
	if (dio->flags & IOMAP_DIO_USER_BACKED) {
		bio_check_pages_dirty(bio);
	} else {
		bio_release_pages(bio, false);
@@ -333,7 +333,7 @@ static ssize_t iomap_dio_bio_iter_one(struct iomap_iter *iter,

	if (dio->flags & IOMAP_DIO_WRITE)
		task_io_account_write(ret);
	else if (dio->flags & IOMAP_DIO_DIRTY)
	else if (dio->flags & IOMAP_DIO_USER_BACKED)
		bio_set_pages_dirty(bio);

	/*
@@ -679,7 +679,7 @@ __iomap_dio_rw(struct kiocb *iocb, struct iov_iter *iter,
			goto out_free_dio;

		if (user_backed_iter(iter))
			dio->flags |= IOMAP_DIO_DIRTY;
			dio->flags |= IOMAP_DIO_USER_BACKED;

		ret = kiocb_write_and_wait(iocb, iomi.len);
		if (ret)