mirror of
https://github.com/torvalds/linux.git
synced 2025-01-01 15:51:46 +00:00
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: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Ritesh Harjani (IBM) <ritesh.harjani@gmail.com>
This commit is contained in:
parent
20c64ec83a
commit
efa96cc997
@ -875,7 +875,7 @@ iomap_file_buffered_write(struct kiocb *iocb, struct iov_iter *i,
|
||||
if (unlikely(iter.pos == iocb->ki_pos))
|
||||
return ret;
|
||||
ret = iter.pos - iocb->ki_pos;
|
||||
iocb->ki_pos += ret;
|
||||
iocb->ki_pos = iter.pos;
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(iomap_file_buffered_write);
|
||||
|
Loading…
Reference in New Issue
Block a user