MIPS: BCM63xx: Add serial driver for bcm63xx integrated UART.
[safe/jmp/linux-2.6] / include / linux / fsnotify_backend.h
index efdf9e4..4d6f47b 100644 (file)
@@ -9,6 +9,7 @@
 
 #ifdef __KERNEL__
 
+#include <linux/idr.h> /* inotify uses this */
 #include <linux/fs.h> /* struct inode */
 #include <linux/list.h>
 #include <linux/path.h> /* struct path */
@@ -59,6 +60,7 @@
 
 /* listeners that hard code group numbers near the top */
 #define DNOTIFY_GROUP_NUM      UINT_MAX
+#define INOTIFY_GROUP_NUM      (DNOTIFY_GROUP_NUM-1)
 
 struct fsnotify_group;
 struct fsnotify_event;
@@ -141,6 +143,15 @@ struct fsnotify_group {
        /* groups can define private fields here or use the void *private */
        union {
                void *private;
+#ifdef CONFIG_INOTIFY_USER
+               struct inotify_group_private_data {
+                       spinlock_t      idr_lock;
+                       struct idr      idr;
+                       u32             last_wd;
+                       struct fasync_struct    *fa;    /* async notification */
+                       struct user_struct      *user;
+               } inotify_data;
+#endif
        };
 };
 
@@ -269,7 +280,7 @@ static inline void __fsnotify_update_dcache_flags(struct dentry *dentry)
        assert_spin_locked(&dentry->d_lock);
 
        parent = dentry->d_parent;
-       if (fsnotify_inode_watches_children(parent->d_inode))
+       if (parent->d_inode && fsnotify_inode_watches_children(parent->d_inode))
                dentry->d_flags |= DCACHE_FSNOTIFY_PARENT_WATCHED;
        else
                dentry->d_flags &= ~DCACHE_FSNOTIFY_PARENT_WATCHED;
@@ -336,11 +347,12 @@ extern void fsnotify_destroy_mark_by_entry(struct fsnotify_mark_entry *entry);
 extern void fsnotify_clear_marks_by_group(struct fsnotify_group *group);
 extern void fsnotify_get_mark(struct fsnotify_mark_entry *entry);
 extern void fsnotify_put_mark(struct fsnotify_mark_entry *entry);
+extern void fsnotify_unmount_inodes(struct list_head *list);
 
 /* put here because inotify does some weird stuff when destroying watches */
 extern struct fsnotify_event *fsnotify_create_event(struct inode *to_tell, __u32 mask,
                                                    void *data, int data_is, const char *name,
-                                                   u32 cookie);
+                                                   u32 cookie, gfp_t gfp);
 
 #else
 
@@ -365,6 +377,9 @@ static inline u32 fsnotify_get_cookie(void)
        return 0;
 }
 
+static inline void fsnotify_unmount_inodes(struct list_head *list)
+{}
+
 #endif /* CONFIG_FSNOTIFY */
 
 #endif /* __KERNEL __ */