[RH7,1/4] ploop: Kaio simplify truncate() in kaio_fsync_thread()

Submitted by Kirill Tkhai on Sept. 19, 2020, 4:50 p.m.

Details

Message ID 160053424301.24001.16469668743135343562.stgit@qvm3002.qa.sw.ru
State New
Series "Series without cover letter"
Headers show

Commit Message

Kirill Tkhai Sept. 19, 2020, 4:50 p.m.
Doing both >> and << is useless since length is aligned
to cluster size.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 drivers/block/ploop/io_kaio.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/block/ploop/io_kaio.c b/drivers/block/ploop/io_kaio.c
index f85dac1..00316e7 100644
--- a/drivers/block/ploop/io_kaio.c
+++ b/drivers/block/ploop/io_kaio.c
@@ -528,8 +528,8 @@  static int kaio_fsync_thread(void * data)
 			isize = i_size_read(io->files.inode);
 			if (WARN_ON_ONCE(preq->prealloc_size < isize))
 				goto out;
-			err = kaio_truncate(io, io->files.file,
-					    preq->prealloc_size >> (plo->cluster_log + 9));
+			err = __kaio_truncate(io, io->files.file,
+					      preq->prealloc_size);
 			if (err)
 				PLOOP_REQ_SET_ERROR(preq, -EIO);
 		} else {