|
@@ -307,7 +307,7 @@ struct dentry *debugfs_create_symlink(const char *name, struct dentry *parent,
|
|
}
|
|
}
|
|
EXPORT_SYMBOL_GPL(debugfs_create_symlink);
|
|
EXPORT_SYMBOL_GPL(debugfs_create_symlink);
|
|
|
|
|
|
-static void __debugfs_remove(struct dentry *dentry, struct dentry *parent)
|
|
|
|
|
|
+static int __debugfs_remove(struct dentry *dentry, struct dentry *parent)
|
|
{
|
|
{
|
|
int ret = 0;
|
|
int ret = 0;
|
|
|
|
|
|
@@ -330,6 +330,7 @@ static void __debugfs_remove(struct dentry *dentry, struct dentry *parent)
|
|
dput(dentry);
|
|
dput(dentry);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ return ret;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -348,7 +349,8 @@ static void __debugfs_remove(struct dentry *dentry, struct dentry *parent)
|
|
void debugfs_remove(struct dentry *dentry)
|
|
void debugfs_remove(struct dentry *dentry)
|
|
{
|
|
{
|
|
struct dentry *parent;
|
|
struct dentry *parent;
|
|
-
|
|
|
|
|
|
+ int ret;
|
|
|
|
+
|
|
if (!dentry)
|
|
if (!dentry)
|
|
return;
|
|
return;
|
|
|
|
|
|
@@ -357,9 +359,10 @@ void debugfs_remove(struct dentry *dentry)
|
|
return;
|
|
return;
|
|
|
|
|
|
mutex_lock(&parent->d_inode->i_mutex);
|
|
mutex_lock(&parent->d_inode->i_mutex);
|
|
- __debugfs_remove(dentry, parent);
|
|
|
|
|
|
+ ret = __debugfs_remove(dentry, parent);
|
|
mutex_unlock(&parent->d_inode->i_mutex);
|
|
mutex_unlock(&parent->d_inode->i_mutex);
|
|
- simple_release_fs(&debugfs_mount, &debugfs_mount_count);
|
|
|
|
|
|
+ if (!ret)
|
|
|
|
+ simple_release_fs(&debugfs_mount, &debugfs_mount_count);
|
|
}
|
|
}
|
|
EXPORT_SYMBOL_GPL(debugfs_remove);
|
|
EXPORT_SYMBOL_GPL(debugfs_remove);
|
|
|
|
|