diff options
| author | David Sterba <[email protected]> | 2025-04-22 16:21:51 +0000 |
|---|---|---|
| committer | David Sterba <[email protected]> | 2025-05-15 12:30:47 +0000 |
| commit | 2d44a15afd4c6f80dd8ac10e710a28e54e5e15c2 (patch) | |
| tree | 05a077b70a1cdfbbc370132e84566a48c87072fc /fs/btrfs/async-thread.c | |
| parent | btrfs: convert ASSERT(0) with handled errors to DEBUG_WARN() (diff) | |
| download | kernel-2d44a15afd4c6f80dd8ac10e710a28e54e5e15c2.tar.gz kernel-2d44a15afd4c6f80dd8ac10e710a28e54e5e15c2.zip | |
btrfs: use list_first_entry() everywhere
Using the helper makes it a bit more clear that we're accessing the
first list entry.
Reviewed-by: Qu Wenruo <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'fs/btrfs/async-thread.c')
| -rw-r--r-- | fs/btrfs/async-thread.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/async-thread.c b/fs/btrfs/async-thread.c index f3bffe08b290..6c6f3bb58f4e 100644 --- a/fs/btrfs/async-thread.c +++ b/fs/btrfs/async-thread.c @@ -219,8 +219,7 @@ static void run_ordered_work(struct btrfs_workqueue *wq, spin_lock_irqsave(lock, flags); if (list_empty(list)) break; - work = list_entry(list->next, struct btrfs_work, - ordered_list); + work = list_first_entry(list, struct btrfs_work, ordered_list); if (!test_bit(WORK_DONE_BIT, &work->flags)) break; /* |
