Commit efa96cc9 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Darrick J. Wong

iomap: micro optimize the ki_pos assignment in iomap_file_buffered_write

We have the new value for ki_pos right at hand in iter.pos, so assign
that instead of recalculating it from ret.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDarrick J. Wong <djwong@kernel.org>
Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
Reviewed-by: default avatarRitesh Harjani (IBM) <ritesh.harjani@gmail.com>
parent 20c64ec8
...@@ -875,7 +875,7 @@ iomap_file_buffered_write(struct kiocb *iocb, struct iov_iter *i, ...@@ -875,7 +875,7 @@ iomap_file_buffered_write(struct kiocb *iocb, struct iov_iter *i,
if (unlikely(iter.pos == iocb->ki_pos)) if (unlikely(iter.pos == iocb->ki_pos))
return ret; return ret;
ret = iter.pos - iocb->ki_pos; ret = iter.pos - iocb->ki_pos;
iocb->ki_pos += ret; iocb->ki_pos = iter.pos;
return ret; return ret;
} }
EXPORT_SYMBOL_GPL(iomap_file_buffered_write); EXPORT_SYMBOL_GPL(iomap_file_buffered_write);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment