--- zzzz-none-000/linux-2.4.17/include/linux/dnotify.h 2000-09-22 21:21:22.000000000 +0000 +++ sangam-fb-322/linux-2.4.17/include/linux/dnotify.h 2004-11-24 13:21:44.000000000 +0000 @@ -23,3 +23,21 @@ if ((inode)->i_dnotify_mask & (event)) __inode_dir_notify(inode, event); } + +/* + * This is hopelessly wrong, but unfixable without API changes. At + * least it doesn't oops the kernel... + */ +static inline void dnotify_parent(struct dentry *dentry, unsigned long event) +{ + struct dentry *parent; + spin_lock(&dcache_lock); + parent = dentry->d_parent; + if (parent->d_inode->i_dnotify_mask & event) { + dget(parent); + spin_unlock(&dcache_lock); + __inode_dir_notify(parent->d_inode, event); + dput(parent); + } else + spin_unlock(&dcache_lock); +}