On Fri, 2005-05-06 at 16:16 -0500, Timothy R. Chavez wrote:
+/*
+ * The update hook is responsible for watching and unwatching d_inodes during
+ * their lifetimes in dcache. Each d_inode being watched is pinned in memory.
+ * As soon as a d_inode becomes unwatched (when !d_inode->i_audit->wentry), it
+ * is unpinned.
Wouldn't it be simpler to hold a reference to the dentry upon
audit_insert_watch(), saving the dentry in the audit_wentry, and then
release it upon audit_wentry_free()? This would keep it pinned from the
time of insertion until the wentry is freed.
--
Stephen Smalley
National Security Agency