Skip to content

Commit b3d423e

Browse files
Christoph Hellwigdjwong
authored andcommitted
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 <[email protected]> Reviewed-by: Dave Chinner <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]>
1 parent ab08b01 commit b3d423e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

fs/iomap/buffered-io.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,13 +1226,12 @@ EXPORT_SYMBOL_GPL(iomap_ioend_try_merge);
12261226
static int
12271227
iomap_ioend_compare(void *priv, struct list_head *a, struct list_head *b)
12281228
{
1229-
struct iomap_ioend *ia, *ib;
1229+
struct iomap_ioend *ia = container_of(a, struct iomap_ioend, io_list);
1230+
struct iomap_ioend *ib = container_of(b, struct iomap_ioend, io_list);
12301231

1231-
ia = container_of(a, struct iomap_ioend, io_list);
1232-
ib = container_of(b, struct iomap_ioend, io_list);
12331232
if (ia->io_offset < ib->io_offset)
12341233
return -1;
1235-
else if (ia->io_offset > ib->io_offset)
1234+
if (ia->io_offset > ib->io_offset)
12361235
return 1;
12371236
return 0;
12381237
}

0 commit comments

Comments
 (0)