[gamin] [patch] inotify: locking



I finally got around to reviewing the locking in inotify, again, in
response to Andrew's points.

There are still three TODO items:

	- Look into replacing i_lock with i_sem.
	- dev->lock nests inode->i_lock.  Preferably i_lock should
	  remain an outermost lock.  Maybe i_sem can fix this.
	- inotify_inode_is_dead() should always have the inode's
	  i_lock locked when called.  I have not yet reviewed the
	  VFS paths that call it to ensure this is the case.

Anyhow, this patch does the following

	- More locking documentation/comments
	- Respect lock ranking when locking two different
	  inodes' i_lock
	- Don't grab dentry->d_lock and just use dget_parent(). [1]
	- Respect lock ranking with dev->lock vs. inode->i_lock.
	- inotify_release_all_watches() needed dev->lock.
	- misc. cleanup

Patch is on top of 0.11.0.

	Robert Love





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]