Skip to content

Instantly share code, notes, and snippets.

@enakai00
Created November 20, 2013 06:04
Show Gist options
  • Save enakai00/7558482 to your computer and use it in GitHub Desktop.
Save enakai00/7558482 to your computer and use it in GitHub Desktop.
--- include/linux/shmem_fs.h.orig 2013-11-20 13:46:54.609963899 +0900
+++ include/linux/shmem_fs.h 2013-11-20 14:24:31.313954190 +0900
@@ -10,6 +10,24 @@
#define SHMEM_NR_DIRECT 16
+struct simple_xattrs {
+ struct list_head head;
+ spinlock_t lock;
+};
+
+struct simple_xattr {
+ struct list_head list;
+ char *name;
+ size_t size;
+ char value[0];
+};
+
+static inline void simple_xattrs_init(struct simple_xattrs *xattrs)
+{
+ INIT_LIST_HEAD(&xattrs->head);
+ spin_lock_init(&xattrs->lock);
+}
+
struct shmem_inode_info {
spinlock_t lock;
unsigned long flags;
@@ -18,6 +36,7 @@
struct shared_policy policy; /* NUMA memory alloc policy */
swp_entry_t i_direct[SHMEM_NR_DIRECT]; /* first blocks */
struct list_head swaplist; /* chain of maybes on swap */
+ struct simple_xattrs xattrs; /* list of xattrs */
struct inode vfs_inode;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment