patch-2.4.18 linux/include/linux/dnotify.h
Next file: linux/include/linux/ext3_fs.h
Previous file: linux/include/linux/cyclades.h
Back to the patch index
Back to the overall index
- Lines: 22
- Date:
Mon Feb 18 19:18:20 2002
- Orig file:
linux.orig/include/linux/dnotify.h
- Orig date:
Fri Sep 22 21:21:22 2000
diff -Naur -X /home/marcelo/lib/dontdiff linux.orig/include/linux/dnotify.h linux/include/linux/dnotify.h
@@ -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);
+}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)