proc: protect mm start_code/end_code in /proc/pid/stat
[firefly-linux-kernel-4.4.55.git] / fs / 9p / v9fs.h
index ce59d1512062f42bc71b4b120dc32d0e88be1f36..9665c2b840e6442a11b550f59da6ddf0ed73f256 100644 (file)
@@ -20,6 +20,9 @@
  *  Boston, MA  02111-1301  USA
  *
  */
+#ifndef FS_9P_V9FS_H
+#define FS_9P_V9FS_H
+
 #include <linux/backing-dev.h>
 
 /**
@@ -116,12 +119,18 @@ struct v9fs_session_info {
        struct p9_fid *root_fid; /* Used for file system sync */
 };
 
+/* cache_validity flags */
+#define V9FS_INO_INVALID_ATTR 0x01
+
 struct v9fs_inode {
 #ifdef CONFIG_9P_FSCACHE
        spinlock_t fscache_lock;
        struct fscache_cookie *fscache;
        struct p9_qid *fscache_key;
 #endif
+       unsigned int cache_validity;
+       struct p9_fid *writeback_fid;
+       struct mutex v_mutex;
        struct inode vfs_inode;
 };
 
@@ -165,6 +174,11 @@ static inline struct v9fs_session_info *v9fs_inode2v9ses(struct inode *inode)
        return (inode->i_sb->s_fs_info);
 }
 
+static inline struct v9fs_session_info *v9fs_dentry2v9ses(struct dentry *dentry)
+{
+       return dentry->d_sb->s_fs_info;
+}
+
 static inline int v9fs_proto_dotu(struct v9fs_session_info *v9ses)
 {
        return v9ses->flags & V9FS_PROTO_2000U;
@@ -192,3 +206,4 @@ v9fs_get_inode_from_fid(struct v9fs_session_info *v9ses, struct p9_fid *fid,
        else
                return v9fs_inode_from_fid(v9ses, fid, sb);
 }
+#endif