* - lost-sysctl-fix.patch removed from -mm tree
@ 2008-07-28 21:11 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2008-07-28 21:11 UTC (permalink / raw)
To: viro, mingo
The patch titled
lost sysctl fix
has been removed from the -mm tree. Its filename was
lost-sysctl-fix.patch
This patch was dropped because it was merged into mainline or a subsystem tree
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
Subject: lost sysctl fix
From: Al Viro <viro@ZenIV.linux.org.uk>
try_attach() should walk into the matching subdirectory, not the first one...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
kernel/sysctl.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff -puN kernel/sysctl.c~lost-sysctl-fix kernel/sysctl.c
--- a/kernel/sysctl.c~lost-sysctl-fix
+++ a/kernel/sysctl.c
@@ -1704,43 +1704,45 @@ static __init int sysctl_init(void)
core_initcall(sysctl_init);
-static int is_branch_in(struct ctl_table *branch, struct ctl_table *table)
+static struct ctl_table *is_branch_in(struct ctl_table *branch,
+ struct ctl_table *table)
{
struct ctl_table *p;
const char *s = branch->procname;
/* branch should have named subdirectory as its first element */
if (!s || !branch->child)
- return 0;
+ return NULL;
/* ... and nothing else */
if (branch[1].procname || branch[1].ctl_name)
- return 0;
+ return NULL;
/* table should contain subdirectory with the same name */
for (p = table; p->procname || p->ctl_name; p++) {
if (!p->child)
continue;
if (p->procname && strcmp(p->procname, s) == 0)
- return 1;
+ return p;
}
- return 0;
+ return NULL;
}
/* see if attaching q to p would be an improvement */
static void try_attach(struct ctl_table_header *p, struct ctl_table_header *q)
{
struct ctl_table *to = p->ctl_table, *by = q->ctl_table;
+ struct ctl_table *next;
int is_better = 0;
int not_in_parent = !p->attached_by;
- while (is_branch_in(by, to)) {
+ while ((next = is_branch_in(by, to)) != NULL) {
if (by == q->attached_by)
is_better = 1;
if (to == p->attached_by)
not_in_parent = 1;
by = by->child;
- to = to->child;
+ to = next->child;
}
if (is_better && not_in_parent) {
_
Patches currently in -mm which might be from viro@ZenIV.linux.org.uk are
origin.patch
linux-next.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-07-28 21:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-28 21:11 - lost-sysctl-fix.patch removed from -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.