Skip to content

Commit

Permalink
configfs: mutex_lock_nested() fix
Browse files Browse the repository at this point in the history
configfs_unregister_subsystem() nests a pair of inode i_mutex acquisitions,
and thus needs annotation via mutex_lock_nested().

Signed-off-by: Mark Fasheh <[email protected]>
  • Loading branch information
Mark Fasheh committed Dec 2, 2006
1 parent 1fabe14 commit 55ed160
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fs/configfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -1176,8 +1176,9 @@ void configfs_unregister_subsystem(struct configfs_subsystem *subsys)
return;
}

mutex_lock(&configfs_sb->s_root->d_inode->i_mutex);
mutex_lock(&dentry->d_inode->i_mutex);
mutex_lock_nested(&configfs_sb->s_root->d_inode->i_mutex,
I_MUTEX_PARENT);
mutex_lock_nested(&dentry->d_inode->i_mutex, I_MUTEX_CHILD);
if (configfs_detach_prep(dentry)) {
printk(KERN_ERR "configfs: Tried to unregister non-empty subsystem!\n");
}
Expand Down

0 comments on commit 55ed160

Please sign in to comment.