patch-2.4.12 linux/include/linux/shmem_fs.h
Next file: linux/mm/shmem.c
Previous file: linux/include/linux/sched.h
Back to the patch index
Back to the overall index
- Lines: 33
- Date:
Wed Oct 10 07:53:57 2001
- Orig file:
v2.4.11/linux/include/linux/shmem_fs.h
- Orig date:
Thu Apr 12 12:25:53 2001
diff -u --recursive --new-file v2.4.11/linux/include/linux/shmem_fs.h linux/include/linux/shmem_fs.h
@@ -17,14 +17,18 @@
unsigned long val;
} swp_entry_t;
+extern atomic_t shmem_nrpages;
+
struct shmem_inode_info {
- spinlock_t lock;
- unsigned long max_index;
- swp_entry_t i_direct[SHMEM_NR_DIRECT]; /* for the first blocks */
- swp_entry_t **i_indirect; /* doubly indirect blocks */
- unsigned long swapped;
- int locked; /* into memory */
+ spinlock_t lock;
+ struct semaphore sem;
+ unsigned long next_index;
+ swp_entry_t i_direct[SHMEM_NR_DIRECT]; /* for the first blocks */
+ void **i_indirect; /* indirect blocks */
+ unsigned long swapped;
+ int locked; /* into memory */
struct list_head list;
+ struct inode *inode;
};
struct shmem_sb_info {
@@ -34,5 +38,7 @@
unsigned long free_inodes; /* How many are left for allocation */
spinlock_t stat_lock;
};
+
+#define SHMEM_I(inode) (&inode->u.shmem_i)
#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)