[Devel] [PATCH RHEL7 COMMIT] ub statd: small optimisations and clean ups

Konstantin Khorenko khorenko at virtuozzo.com
Thu Oct 8 04:52:43 PDT 2015


The commit is pushed to "branch-rh7-3.10.0-229.7.2.vz7.8.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-229.7.2.vz7.8.4
------>
commit bd1560cfe048dab527472087538b187978d8ef25
Author: Stanislav Kinsburskiy <skinsbursky at parallels.com>
Date:   Thu Oct 8 15:52:42 2015 +0400

    ub statd: small optimisations and clean ups
    
    Signed-off-by: Stanislav Kinsburskiy <skinsbursky at parallels.com>
---
 kernel/bc/statd.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/kernel/bc/statd.c b/kernel/bc/statd.c
index b0b58a4..97602da 100644
--- a/kernel/bc/statd.c
+++ b/kernel/bc/statd.c
@@ -441,18 +441,16 @@ static inline void do_notifies(void)
 	ubstat_save_statistics();
 	/* send signals */
 	read_lock(&tasklist_lock);
-	while (!list_empty(&ubs_notify_list)) {
-		notify = list_entry(ubs_notify_list.next,
-				struct ub_stat_notify, list);
+	list_for_each_entry_safe(notify, tmp, &ubs_notify_list, list) {
 		task_send_sig(notify);
-		list_del(&notify->list);
-		list_add(&notify->list, &notif_free_list);
+		list_move(&notify->list, &notif_free_list);
 	}
 	read_unlock(&tasklist_lock);
 	spin_unlock(&ubs_notify_lock);
 
 	list_for_each_entry_safe(notify, tmp, &notif_free_list, list) {
 		put_task_struct(notify->task);
+		list_del(&notify->list);
 		kfree(notify);
 	}
 }



More information about the Devel mailing list