Input: fix locking in memoryless force-feedback devices
[safe/jmp/linux-2.6] / include / linux / dcache.h
index c66d224..30b93b2 100644 (file)
@@ -112,7 +112,7 @@ struct dentry {
        struct list_head d_subdirs;     /* our children */
        struct list_head d_alias;       /* inode alias list */
        unsigned long d_time;           /* used by d_revalidate */
-       struct dentry_operations *d_op;
+       const struct dentry_operations *d_op;
        struct super_block *d_sb;       /* The root of the dentry tree */
        void *d_fsdata;                 /* fs-specific data */
 
@@ -180,10 +180,12 @@ d_iput:           no              no              no       yes
 #define DCACHE_REFERENCED      0x0008  /* Recently used, don't discard. */
 #define DCACHE_UNHASHED                0x0010  
 
-#define DCACHE_INOTIFY_PARENT_WATCHED  0x0020 /* Parent inode is watched */
+#define DCACHE_INOTIFY_PARENT_WATCHED  0x0020 /* Parent inode is watched by inotify */
 
 #define DCACHE_COOKIE          0x0040  /* For use by dcookie subsystem */
 
+#define DCACHE_FSNOTIFY_PARENT_WATCHED 0x0080 /* Parent inode is watched by some fsnotify listener */
+
 extern spinlock_t dcache_lock;
 extern seqlock_t rename_lock;
 
@@ -351,6 +353,11 @@ static inline int d_unhashed(struct dentry *dentry)
        return (dentry->d_flags & DCACHE_UNHASHED);
 }
 
+static inline int d_unlinked(struct dentry *dentry)
+{
+       return d_unhashed(dentry) && !IS_ROOT(dentry);
+}
+
 static inline struct dentry *dget_parent(struct dentry *dentry)
 {
        struct dentry *ret;
@@ -368,7 +375,7 @@ static inline int d_mountpoint(struct dentry *dentry)
        return dentry->d_mounted;
 }
 
-extern struct vfsmount *lookup_mnt(struct vfsmount *, struct dentry *);
+extern struct vfsmount *lookup_mnt(struct path *);
 extern struct dentry *lookup_create(struct nameidata *nd, int is_dir);
 
 extern int sysctl_vfs_cache_pressure;