summaryrefslogtreecommitdiff
path: root/fs/btrfs/async-thread.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2025-04-22 18:21:51 +0200
committerDavid Sterba <dsterba@suse.com>2025-05-15 14:30:47 +0200
commit2d44a15afd4c6f80dd8ac10e710a28e54e5e15c2 (patch)
tree05a077b70a1cdfbbc370132e84566a48c87072fc /fs/btrfs/async-thread.c
parent9e0a739a9e83eb28ceb0b1e97861c88f177a7f18 (diff)
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 <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/async-thread.c')
-rw-r--r--fs/btrfs/async-thread.c3
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;
/*