提交 55ed1602 编写于 作者: M Mark Fasheh

configfs: mutex_lock_nested() fix

configfs_unregister_subsystem() nests a pair of inode i_mutex acquisitions,
and thus needs annotation via mutex_lock_nested().
Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
上级 1fabe148
...@@ -1176,8 +1176,9 @@ void configfs_unregister_subsystem(struct configfs_subsystem *subsys) ...@@ -1176,8 +1176,9 @@ void configfs_unregister_subsystem(struct configfs_subsystem *subsys)
return; return;
} }
mutex_lock(&configfs_sb->s_root->d_inode->i_mutex); mutex_lock_nested(&configfs_sb->s_root->d_inode->i_mutex,
mutex_lock(&dentry->d_inode->i_mutex); I_MUTEX_PARENT);
mutex_lock_nested(&dentry->d_inode->i_mutex, I_MUTEX_CHILD);
if (configfs_detach_prep(dentry)) { if (configfs_detach_prep(dentry)) {
printk(KERN_ERR "configfs: Tried to unregister non-empty subsystem!\n"); printk(KERN_ERR "configfs: Tried to unregister non-empty subsystem!\n");
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册