summaryrefslogtreecommitdiff
path: root/fs/iomap
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-10-17 23:12:20 +0300
committerDarrick J. Wong <darrick.wong@oracle.com>2019-10-21 18:51:59 +0300
commitb3d423ec898ae27007a9c49915ac06a2f50b404f (patch)
treeab0e0a8644a142b74c81126d0d456885d2bb9d73 /fs/iomap
parentab08b01ec0a205d9c98e712eb504c850a51e6fdb (diff)
downloadlinux-b3d423ec898ae27007a9c49915ac06a2f50b404f.tar.xz
iomap: cleanup iomap_ioend_compare
Move the initialization of ia and ib to the declaration line and remove a superflous else. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/iomap')
-rw-r--r--fs/iomap/buffered-io.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index b5ff54fddf1f..529a759c5f9b 100644
--- a/fs/iomap/buffered-io.c
+++ b/fs/iomap/buffered-io.c
@@ -1226,13 +1226,12 @@ EXPORT_SYMBOL_GPL(iomap_ioend_try_merge);
static int
iomap_ioend_compare(void *priv, struct list_head *a, struct list_head *b)
{
- struct iomap_ioend *ia, *ib;
+ struct iomap_ioend *ia = container_of(a, struct iomap_ioend, io_list);
+ struct iomap_ioend *ib = container_of(b, struct iomap_ioend, io_list);
- ia = container_of(a, struct iomap_ioend, io_list);
- ib = container_of(b, struct iomap_ioend, io_list);
if (ia->io_offset < ib->io_offset)
return -1;
- else if (ia->io_offset > ib->io_offset)
+ if (ia->io_offset > ib->io_offset)
return 1;
return 0;
}