mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 08:33:17 +02:00
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: Christoph Hellwig <hch@lst.de> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Tested-by: Anuj Gupta <anuj20.g@samsung.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
45cec0de6c
commit
c96b8b2202
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user