Skip to contentSkip to conversation

proc-save-loc-by-using-while-loop.patch removed from -mm tree

merged mm-nonmm-stable Andrew Morton 1 participant 1 message Oct 18, 2023

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: proc: save LOC by using while loop
has been removed from the -mm tree. Its filename was
proc-save-loc-by-using-while-loop.patch

This patch was dropped because it was merged into the mm-nonmm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Alexey Dobriyan <[email protected]>
Subject: proc: save LOC by using while loop
Date: Fri, 29 Sep 2023 19:31:41 +0300

Use while loop instead of infinite loop with "break;".

Also move some variable to the inner scope where they belong.

---

 fs/proc/inode.c |   11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
fs/proc/inode.c renamed from fs/proc/inode.c~proc-save-loc-by-using-while-loop +4 -7
@@ -110,18 +110,15 @@ void __init proc_init_kmemcache(void)
 
 void proc_invalidate_siblings_dcache(struct hlist_head *inodes, spinlock_t *lock)
 {
-	struct inode *inode;
-	struct proc_inode *ei;
 	struct hlist_node *node;
 	struct super_block *old_sb = NULL;
 
 	rcu_read_lock();
-	for (;;) {
+	while ((node = hlist_first_rcu(inodes))) {
+		struct proc_inode *ei = hlist_entry(node, struct proc_inode, sibling_inodes);
 		struct super_block *sb;
-		node = hlist_first_rcu(inodes);
-		if (!node)
-			break;
-		ei = hlist_entry(node, struct proc_inode, sibling_inodes);
+		struct inode *inode;
+
 		spin_lock(lock);
 		hlist_del_init_rcu(&ei->sibling_inodes);
 		spin_unlock(lock);

_

Patches currently in -mm which might be from [email protected] are