2004-10-05 15:29:52

by Simon Derr

[permalink] [raw]
Subject: [PATCH] cpusets : fix cpuset_get_dentry()


Hi Andrew,

This patch fixes a trivial bug, triggered when using the cpusets as a
non-root user.

Against 2.6.9-rc2-mm1.

Simon.

Signed-off-by: Paul Jackson <[email protected]>
Signed-off-by: Simon Derr <[email protected]>

Index: 269rc2mm1/kernel/cpuset.c
===================================================================
--- 269rc2mm1.orig/kernel/cpuset.c 2004-10-05 16:35:32.751926987 +0200
+++ 269rc2mm1/kernel/cpuset.c 2004-10-05 16:36:27.769504438 +0200
@@ -235,7 +235,7 @@ static struct dentry *cpuset_get_dentry(
qstr.len = strlen(name);
qstr.hash = full_name_hash(name, qstr.len);
d = lookup_hash(&qstr, parent);
- if (d)
+ if (!IS_ERR(d))
d->d_op = &cpuset_dops;
return d;
}