diff --git a/fs/direct-io.c b/fs/direct-io.c
index f853263cf74f8abf29016db5e44eaa9e0de44abc..9644d0205dad5582d64433d4f4b86c172d0078e4 100644
--- a/fs/direct-io.c
+++ b/fs/direct-io.c
@@ -969,7 +969,8 @@ static int do_direct_IO(struct dio *dio, struct dio_submit *sdio,
 			this_chunk_bytes = this_chunk_blocks << blkbits;
 			BUG_ON(this_chunk_bytes == 0);
 
-			sdio->boundary = buffer_boundary(map_bh);
+			if (this_chunk_blocks == sdio->blocks_available)
+				sdio->boundary = buffer_boundary(map_bh);
 			ret = submit_page_section(dio, sdio, page,
 						  offset_in_page,
 						  this_chunk_bytes,