[patch] inotify: locking

From: Robert Love
Date: Thu Sep 30 2004 - 14:10:53 EST


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


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/