Tag: 5a2ca43fa54f561c252c2ceb986daa49e258ab13

Staging: lustre: Iterate list using list_for_each_entry

Author: Somya Anand <somyaanand214@gmail.com> Code using doubly linked list is iterated generally using list_empty and list_entry functions, but it can be better written using list_for_each_entry macro. This patch replaces the while loop containing list_empty and list_entry with list_for_each_entry and list_for_each_entry_safe. list_for_each_entry is a macro which is used to iterate over a list of given type. …

Continue reading