mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
fs: direct-io: convert rw from READ to KERNEL_READ
KERNEL_READ equal READ puls REQ_KERNEL, which indicates this brq comes from direct-io. Any block-layer devices who care this req type can get it now. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
This commit is contained in:
@@ -370,6 +370,7 @@ static inline void dio_bio_submit(struct dio *dio, struct dio_submit *sdio)
|
||||
{
|
||||
struct bio *bio = sdio->bio;
|
||||
unsigned long flags;
|
||||
int rw;
|
||||
|
||||
bio->bi_private = dio;
|
||||
|
||||
@@ -380,6 +381,9 @@ static inline void dio_bio_submit(struct dio *dio, struct dio_submit *sdio)
|
||||
if (dio->is_async && dio->rw == READ)
|
||||
bio_set_pages_dirty(bio);
|
||||
|
||||
rw = dio->rw;
|
||||
dio->rw |= (dio->rw == READ) ? KERNEL_READ : KERNEL_WRITE;
|
||||
|
||||
if (sdio->submit_io)
|
||||
sdio->submit_io(dio->rw, bio, dio->inode,
|
||||
sdio->logical_offset_in_bio);
|
||||
|
||||
Reference in New Issue
Block a user