diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/sysfs/inode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c index 1a81ebce20e9..dbd820f9aeed 100644 --- a/fs/sysfs/inode.c +++ b/fs/sysfs/inode.c | |||
@@ -215,7 +215,7 @@ static inline void orphan_all_buffers(struct inode *node) | |||
215 | struct sysfs_buffer_collection *set = node->i_private; | 215 | struct sysfs_buffer_collection *set = node->i_private; |
216 | struct sysfs_buffer *buf; | 216 | struct sysfs_buffer *buf; |
217 | 217 | ||
218 | mutex_lock(&node->i_mutex); | 218 | mutex_lock_nested(&node->i_mutex, I_MUTEX_CHILD); |
219 | if (node->i_private) { | 219 | if (node->i_private) { |
220 | list_for_each_entry(buf, &set->associates, associates) { | 220 | list_for_each_entry(buf, &set->associates, associates) { |
221 | down(&buf->sem); | 221 | down(&buf->sem); |
@@ -272,7 +272,7 @@ int sysfs_hash_and_remove(struct dentry * dir, const char * name) | |||
272 | return -ENOENT; | 272 | return -ENOENT; |
273 | 273 | ||
274 | parent_sd = dir->d_fsdata; | 274 | parent_sd = dir->d_fsdata; |
275 | mutex_lock(&dir->d_inode->i_mutex); | 275 | mutex_lock_nested(&dir->d_inode->i_mutex, I_MUTEX_PARENT); |
276 | list_for_each_entry(sd, &parent_sd->s_children, s_sibling) { | 276 | list_for_each_entry(sd, &parent_sd->s_children, s_sibling) { |
277 | if (!sd->s_element) | 277 | if (!sd->s_element) |
278 | continue; | 278 | continue; |