]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/fs.h
Merge master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa
[linux-2.6-omap-h63xx.git] / include / linux / fs.h
index f83d997c55820101385553e780fa5216d2be25fc..9a593ef262ef183807bb094a0fc494e399b6aacb 100644 (file)
@@ -264,6 +264,7 @@ typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset,
 #define ATTR_ATTR_FLAG 1024
 #define ATTR_KILL_SUID 2048
 #define ATTR_KILL_SGID 4096
+#define ATTR_FILE      8192
 
 /*
  * This is the Inode Attributes structure, used for notify_change().  It
@@ -283,6 +284,13 @@ struct iattr {
        struct timespec ia_atime;
        struct timespec ia_mtime;
        struct timespec ia_ctime;
+
+       /*
+        * Not an attribute, but an auxilary info for filesystems wanting to
+        * implement an ftruncate() like method.  NOTE: filesystem should
+        * check for (ia_valid & ATTR_FILE), and not for (ia_file != NULL).
+        */
+       struct file     *ia_file;
 };
 
 /*
@@ -574,7 +582,14 @@ struct file_ra_state {
 #define RA_FLAG_INCACHE 0x02   /* file is already in cache */
 
 struct file {
-       struct list_head        f_list;
+       /*
+        * fu_list becomes invalid after file_free is called and queued via
+        * fu_rcuhead for RCU freeing
+        */
+       union {
+               struct list_head        fu_list;
+               struct rcu_head         fu_rcuhead;
+       } f_u;
        struct dentry           *f_dentry;
        struct vfsmount         *f_vfsmnt;
        struct file_operations  *f_op;
@@ -598,7 +613,6 @@ struct file {
        spinlock_t              f_ep_lock;
 #endif /* #ifdef CONFIG_EPOLL */
        struct address_space    *f_mapping;
-       struct rcu_head         f_rcuhead;
 };
 extern spinlock_t files_lock;
 #define file_list_lock() spin_lock(&files_lock);
@@ -1082,6 +1096,8 @@ int sync_inode(struct inode *inode, struct writeback_control *wbc);
  * @get_name:       find the name for a given inode in a given directory
  * @get_parent:     find the parent of a given directory
  * @get_dentry:     find a dentry for the inode given a file handle sub-fragment
+ * @find_exported_dentry:
+ *     set by the exporting module to a standard helper function.
  *
  * Description:
  *    The export_operations structure provides a means for nfsd to communicate
@@ -1282,7 +1298,7 @@ static inline int break_lease(struct inode *inode, unsigned int mode)
 
 /* fs/open.c */
 
-extern int do_truncate(struct dentry *, loff_t start);
+extern int do_truncate(struct dentry *, loff_t start, struct file *filp);
 extern long do_sys_open(const char __user *filename, int flags, int mode);
 extern struct file *filp_open(const char *, int, int);
 extern struct file * dentry_open(struct dentry *, struct vfsmount *, int);