Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP4:GA
btrfsprogs
btrfs-progs-backref-add-list_first_pref-helper....
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File btrfs-progs-backref-add-list_first_pref-helper.patch of Package btrfsprogs
From: Jeff Mahoney <jeffm@suse.com> Subject: btrfs-progs: backref: add list_first_pref helper Git-commit: e520de0dbb3207e45e06b05b1eb08f1764e0935e Patch-mainline: v4.13.2 References: bsc#1125340 Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: David Sterba <dsterba@suse.com> --- backref.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/backref.c b/backref.c index 127951c5..305cd053 100644 --- a/backref.c +++ b/backref.c @@ -130,6 +130,11 @@ struct __prelim_ref { u64 wanted_disk_byte; }; +static struct __prelim_ref *list_first_pref(struct list_head *head) +{ + return list_first_entry(head, struct __prelim_ref, list); +} + struct pref_state { struct list_head pending; }; @@ -803,8 +808,7 @@ static int find_parent_nodes(struct btrfs_trans_handle *trans, __merge_refs(&prefstate, 2); while (!list_empty(&prefstate.pending)) { - ref = list_first_entry(&prefstate.pending, - struct __prelim_ref, list); + ref = list_first_pref(&prefstate.pending); WARN_ON(ref->count < 0); if (roots && ref->count && ref->root_id && ref->parent == 0) { /* no parent == root of tree */ @@ -854,8 +858,7 @@ static int find_parent_nodes(struct btrfs_trans_handle *trans, out: btrfs_free_path(path); while (!list_empty(&prefstate.pending)) { - ref = list_first_entry(&prefstate.pending, - struct __prelim_ref, list); + ref = list_first_pref(&prefstate.pending); list_del(&ref->list); kfree(ref); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor