Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq
[pandora-kernel.git] / include / linux / fs.h
index 3ae8e37..f9adf75 100644 (file)
@@ -213,6 +213,7 @@ extern int dir_notify_enable;
 #include <linux/radix-tree.h>
 #include <linux/prio_tree.h>
 #include <linux/init.h>
+#include <linux/sched.h>
 
 #include <asm/atomic.h>
 #include <asm/semaphore.h>
@@ -473,6 +474,11 @@ struct inode {
        struct dnotify_struct   *i_dnotify; /* for directory notifications */
 #endif
 
+#ifdef CONFIG_INOTIFY
+       struct list_head        inotify_watches; /* watches on this inode */
+       struct semaphore        inotify_sem;    /* protects the watches list */
+#endif
+
        unsigned long           i_state;
        unsigned long           dirtied_when;   /* jiffies of first dirtying */
 
@@ -691,11 +697,13 @@ extern struct list_head file_lock_list;
 #include <linux/fcntl.h>
 
 extern int fcntl_getlk(struct file *, struct flock __user *);
-extern int fcntl_setlk(struct file *, unsigned int, struct flock __user *);
+extern int fcntl_setlk(unsigned int, struct file *, unsigned int,
+                       struct flock __user *);
 
 #if BITS_PER_LONG == 32
 extern int fcntl_getlk64(struct file *, struct flock64 __user *);
-extern int fcntl_setlk64(struct file *, unsigned int, struct flock64 __user *);
+extern int fcntl_setlk64(unsigned int, struct file *, unsigned int,
+                       struct flock64 __user *);
 #endif
 
 extern void send_sigio(struct fown_struct *fown, int fd, int band);
@@ -822,16 +830,34 @@ enum {
 #define vfs_check_frozen(sb, level) \
        wait_event((sb)->s_wait_unfrozen, ((sb)->s_frozen < (level)))
 
+static inline void get_fs_excl(void)
+{
+       atomic_inc(&current->fs_excl);
+}
+
+static inline void put_fs_excl(void)
+{
+       atomic_dec(&current->fs_excl);
+}
+
+static inline int has_fs_excl(void)
+{
+       return atomic_read(&current->fs_excl);
+}
+
+
 /*
  * Superblock locking.
  */
 static inline void lock_super(struct super_block * sb)
 {
+       get_fs_excl();
        down(&sb->s_lock);
 }
 
 static inline void unlock_super(struct super_block * sb)
 {
+       put_fs_excl();
        up(&sb->s_lock);
 }
 
@@ -1374,7 +1400,6 @@ extern void emergency_remount(void);
 extern int do_remount_sb(struct super_block *sb, int flags,
                         void *data, int force);
 extern sector_t bmap(struct inode *, sector_t);
-extern int setattr_mask(unsigned int);
 extern int notify_change(struct dentry *, struct iattr *);
 extern int permission(struct inode *, int, struct nameidata *);
 extern int generic_permission(struct inode *, int,
@@ -1416,7 +1441,11 @@ extern struct inode * igrab(struct inode *);
 extern ino_t iunique(struct super_block *, ino_t);
 extern int inode_needs_sync(struct inode *inode);
 extern void generic_delete_inode(struct inode *inode);
+extern void generic_drop_inode(struct inode *inode);
 
+extern struct inode *ilookup5_nowait(struct super_block *sb,
+               unsigned long hashval, int (*test)(struct inode *, void *),
+               void *data);
 extern struct inode *ilookup5(struct super_block *sb, unsigned long hashval,
                int (*test)(struct inode *, void *), void *data);
 extern struct inode *ilookup(struct super_block *sb, unsigned long ino);