alistair23-linux/drivers/usb/core
Arjan van de Ven 8e7795ef6b [PATCH] lockdep: annotate USBFS
In usbfs's fs_remove_file() function, the aim is to remove a file or
directory from usbfs. This is done by first taking the i_mutex of the
parent directory of this file/dir via
  mutex_lock(&parent->d_inode->i_mutex);
and then to call either usbfs_rmdir() for a directory or usbfs_unlink()
for a file. Both these functions then take the i_mutex for the
to-be-removed object themselves:
  mutex_lock(&inode->i_mutex);

This is a classical parent->child locking order relationship that the VFS uses
all over the place; the VFS locking rule is "you need to take the parent
first".  This patch annotates the usbfs code to make this explicit and thus
informs the lockdep code that those two locks indeed have this relationship.

The rules for unlink that we already use in the VFS for unlink are to use
I_MUTEX_PARENT for the parent directory, and a normal mutex for the file
itself; this patch follows that convention.

Has no effect on non-lockdep kernels.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-03 15:27:08 -07:00
..
buffer.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
config.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
devices.c [PATCH] USB: convert a bunch of USB semaphores to mutexes 2006-03-20 14:49:55 -08:00
devio.c [PATCH] SELinux: update USB code with new kill_proc_info_as_uid 2006-06-30 11:25:37 -07:00
driver.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
endpoint.c [PATCH] USB: make endpoints real struct devices 2006-06-21 15:04:19 -07:00
file.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
hcd-pci.c [PATCH] irq-flags: usb: Use the new IRQF_ constants 2006-07-02 13:58:53 -07:00
hcd.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
hcd.h [PATCH] USB: remove usbcore-specific wakeup flags 2006-03-20 14:49:56 -08:00
hub.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
hub.h [PATCH] USB: Consider power budget when choosing configuration 2006-01-04 13:48:34 -08:00
inode.c [PATCH] lockdep: annotate USBFS 2006-07-03 15:27:08 -07:00
Kconfig [PATCH] USB: otg hub support is optional 2006-04-14 11:12:23 -07:00
Makefile [PATCH] USB: move the endpoint specific sysfs code to it's own file 2006-06-21 15:04:18 -07:00
message.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
notify.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
otg_whitelist.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sysfs.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
urb.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
usb.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
usb.h [PATCH] SELinux: update USB code with new kill_proc_info_as_uid 2006-06-30 11:25:37 -07:00