diff options
author | Mark Fasheh <mark.fasheh@oracle.com> | 2006-10-20 17:55:54 -0400 |
---|---|---|
committer | Mark Fasheh <mark.fasheh@oracle.com> | 2006-12-01 21:28:34 -0500 |
commit | 55ed16029d597622db8121270e687373b5e31722 (patch) | |
tree | a8ffbd1fe4d867f48eada13fc24b6bbfc70f245d /fs/configfs/dir.c | |
parent | 1fabe1481fac9e01bf8bffa60a2307ef379aa5de (diff) |
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: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/configfs/dir.c')
-rw-r--r-- | fs/configfs/dir.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c index 8a3b6a1a6ad1..452cfd1e785f 100644 --- a/fs/configfs/dir.c +++ b/fs/configfs/dir.c | |||
@@ -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 | } |