]> err.no Git - linux-2.6/blobdiff - fs/sysfs/dir.c
Auto-update from upstream
[linux-2.6] / fs / sysfs / dir.c
index 59734ba1ee6026556af405cfe77a6bf21f30084e..d367803821760883ce6d1043ef7aec5c470145f9 100644 (file)
@@ -112,7 +112,11 @@ static int create_dir(struct kobject * k, struct dentry * p,
                        }
                }
                if (error && (error != -EEXIST)) {
-                       sysfs_put((*d)->d_fsdata);
+                       struct sysfs_dirent *sd = (*d)->d_fsdata;
+                       if (sd) {
+                               list_del_init(&sd->s_sibling);
+                               sysfs_put(sd);
+                       }
                        d_drop(*d);
                }
                dput(*d);