aboutsummaryrefslogtreecommitdiffstats
path: root/fs/configfs/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/configfs/dir.c')
-rw-r--r--fs/configfs/dir.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c
index 8a3b6a1a6ad1..c398861f78a5 100644
--- a/fs/configfs/dir.c
+++ b/fs/configfs/dir.c
@@ -93,8 +93,8 @@ static struct configfs_dirent *configfs_new_dirent(struct configfs_dirent * pare
93 * 93 *
94 * called with parent inode's i_mutex held 94 * called with parent inode's i_mutex held
95 */ 95 */
96int configfs_dirent_exists(struct configfs_dirent *parent_sd, 96static int configfs_dirent_exists(struct configfs_dirent *parent_sd,
97 const unsigned char *new) 97 const unsigned char *new)
98{ 98{
99 struct configfs_dirent * sd; 99 struct configfs_dirent * sd;
100 100
@@ -1176,8 +1176,9 @@ void configfs_unregister_subsystem(struct configfs_subsystem *subsys)
1176 return; 1176 return;
1177 } 1177 }
1178 1178
1179 mutex_lock(&configfs_sb->s_root->d_inode->i_mutex); 1179 mutex_lock_nested(&configfs_sb->s_root->d_inode->i_mutex,
1180 mutex_lock(&dentry->d_inode->i_mutex); 1180 I_MUTEX_PARENT);
1181 mutex_lock_nested(&dentry->d_inode->i_mutex, I_MUTEX_CHILD);
1181 if (configfs_detach_prep(dentry)) { 1182 if (configfs_detach_prep(dentry)) {
1182 printk(KERN_ERR "configfs: Tried to unregister non-empty subsystem!\n"); 1183 printk(KERN_ERR "configfs: Tried to unregister non-empty subsystem!\n");
1183 } 1184 }