+ direct-io-minor-cleanups-in-do_blockdev_direct_io.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: fs/direct-io.c: minor cleanups in do_blockdev_direct_IO
has been added to the -mm tree.  Its filename is
     direct-io-minor-cleanups-in-do_blockdev_direct_io.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/direct-io-minor-cleanups-in-do_blockdev_direct_io.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/direct-io-minor-cleanups-in-do_blockdev_direct_io.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Nikolay Borisov <nborisov@xxxxxxxx>
Subject: fs/direct-io.c: minor cleanups in do_blockdev_direct_IO

We already get the block counts and calculate the end block at the
beginning of the function.  Let's use the local variables for consistency
and readability.  No functional changes

Link: http://lkml.kernel.org/r/1519638870-17756-1-git-send-email-nborisov@xxxxxxxx
Signed-off-by: Nikolay Borisov <nborisov@xxxxxxxx>
Reviewed-by: Jeff Moyer <jmoyer@xxxxxxxxxx>
Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Cc: Jens Axboe <axboe@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/direct-io.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff -puN fs/direct-io.c~direct-io-minor-cleanups-in-do_blockdev_direct_io fs/direct-io.c
--- a/fs/direct-io.c~direct-io-minor-cleanups-in-do_blockdev_direct_io
+++ a/fs/direct-io.c
@@ -1201,7 +1201,7 @@ do_blockdev_direct_IO(struct kiocb *iocb
 	}
 
 	/* watch out for a 0 len io from a tricksy fs */
-	if (iov_iter_rw(iter) == READ && !iov_iter_count(iter))
+	if (iov_iter_rw(iter) == READ && !count)
 		return 0;
 
 	dio = kmem_cache_alloc(dio_cache, GFP_KERNEL);
@@ -1318,8 +1318,7 @@ do_blockdev_direct_IO(struct kiocb *iocb
 
 	dio->should_dirty = (iter->type == ITER_IOVEC);
 	sdio.iter = iter;
-	sdio.final_block_in_request =
-		(offset + iov_iter_count(iter)) >> blkbits;
+	sdio.final_block_in_request = end >> blkbits;
 
 	/*
 	 * In case of non-aligned buffers, we may need 2 more
_

Patches currently in -mm which might be from nborisov@xxxxxxxx are

direct-io-minor-cleanups-in-do_blockdev_direct_io.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux