aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/sysfs/dir.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index 59734ba1ee60..d36780382176 100644
--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -112,7 +112,11 @@ static int create_dir(struct kobject * k, struct dentry * p,
112 } 112 }
113 } 113 }
114 if (error && (error != -EEXIST)) { 114 if (error && (error != -EEXIST)) {
115 sysfs_put((*d)->d_fsdata); 115 struct sysfs_dirent *sd = (*d)->d_fsdata;
116 if (sd) {
117 list_del_init(&sd->s_sibling);
118 sysfs_put(sd);
119 }
116 d_drop(*d); 120 d_drop(*d);
117 } 121 }
118 dput(*d); 122 dput(*d);