]> err.no Git - linux-2.6/blobdiff - fs/sysfs/group.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fix
[linux-2.6] / fs / sysfs / group.c
index f11ac5ea7021c4b325211b2f7e58b6e29fbbc60c..52eed2a7a5efbf91061362b11ca54794d22e0c25 100644 (file)
 #include <linux/kobject.h>
 #include <linux/module.h>
 #include <linux/dcache.h>
+#include <linux/namei.h>
 #include <linux/err.h>
+#include <linux/fs.h>
+#include <asm/semaphore.h>
 #include "sysfs.h"
 
 
@@ -67,8 +70,11 @@ void sysfs_remove_group(struct kobject * kobj,
 {
        struct dentry * dir;
 
-       if (grp->name)
-               dir = sysfs_get_dentry(kobj->dentry,grp->name);
+       if (grp->name) {
+               dir = lookup_one_len_kern(grp->name, kobj->dentry,
+                               strlen(grp->name));
+               BUG_ON(IS_ERR(dir));
+       }
        else
                dir = dget(kobj->dentry);