Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'driver-core-3.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core fix from Greg KH:
"Here is a single kernfs fix to resolve a much-reported lockdep issue
with the removal of entries in sysfs"

* tag 'driver-core-3.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
kernfs: make kernfs_deactivate() honor KERNFS_LOCKDEP flag

+8 -4
+8 -4
fs/kernfs/dir.c
··· 187 187 188 188 kn->u.completion = (void *)&wait; 189 189 190 - rwsem_acquire(&kn->dep_map, 0, 0, _RET_IP_); 190 + if (kn->flags & KERNFS_LOCKDEP) 191 + rwsem_acquire(&kn->dep_map, 0, 0, _RET_IP_); 191 192 /* atomic_add_return() is a mb(), put_active() will always see 192 193 * the updated kn->u.completion. 193 194 */ 194 195 v = atomic_add_return(KN_DEACTIVATED_BIAS, &kn->active); 195 196 196 197 if (v != KN_DEACTIVATED_BIAS) { 197 - lock_contended(&kn->dep_map, _RET_IP_); 198 + if (kn->flags & KERNFS_LOCKDEP) 199 + lock_contended(&kn->dep_map, _RET_IP_); 198 200 wait_for_completion(&wait); 199 201 } 200 202 201 - lock_acquired(&kn->dep_map, _RET_IP_); 202 - rwsem_release(&kn->dep_map, 1, _RET_IP_); 203 + if (kn->flags & KERNFS_LOCKDEP) { 204 + lock_acquired(&kn->dep_map, _RET_IP_); 205 + rwsem_release(&kn->dep_map, 1, _RET_IP_); 206 + } 203 207 } 204 208 205 209 /**