diff options
Diffstat (limited to 'fs/sysfs/inode.c')
-rw-r--r-- | fs/sysfs/inode.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c index dd1344b007f..4de5c6b8991 100644 --- a/fs/sysfs/inode.c +++ b/fs/sysfs/inode.c @@ -222,11 +222,12 @@ const unsigned char * sysfs_get_name(struct sysfs_dirent *sd) static inline void orphan_all_buffers(struct inode *node) { - struct sysfs_buffer_collection *set = node->i_private; + struct sysfs_buffer_collection *set; struct sysfs_buffer *buf; mutex_lock_nested(&node->i_mutex, I_MUTEX_CHILD); - if (node->i_private) { + set = node->i_private; + if (set) { list_for_each_entry(buf, &set->associates, associates) { down(&buf->sem); buf->orphaned = 1; |