From d9acf5fe72b5d512be31685803b6f362a2a6bb23 Mon Sep 17 00:00:00 2001 From: Hugh Dickins Date: Mon, 29 Jul 2002 01:27:26 -0700 Subject: [PATCH] shmem_file_setup when MAP_NORESERVE If we support mmap MAP_NORESERVE, we should support it on shared anonymous objects: too bad that needs a few changes. do_mmap_pgoff pass VM_ACCOUNT (or not) down to shmem_file_setup, flag stored into shmem info, for use by shmem_delete_inode later. Also removed a harmless but pointless call to shmem_truncate. --- include/linux/mm.h | 2 +- include/linux/shmem_fs.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'include/linux') diff --git a/include/linux/mm.h b/include/linux/mm.h index 7db061bc3468..cb48ce0f9d38 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -331,7 +331,7 @@ extern void show_free_areas(void); extern int fail_writepage(struct page *); struct page * shmem_nopage(struct vm_area_struct * vma, unsigned long address, int unused); -struct file *shmem_file_setup(char * name, loff_t size); +struct file *shmem_file_setup(char * name, loff_t size, unsigned long flags); extern void shmem_lock(struct file * file, int lock); extern int shmem_zero_setup(struct vm_area_struct *); diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h index d4e0ab279388..9d39c403c0a0 100644 --- a/include/linux/shmem_fs.h +++ b/include/linux/shmem_fs.h @@ -16,7 +16,7 @@ struct shmem_inode_info { swp_entry_t i_direct[SHMEM_NR_DIRECT]; /* for the first blocks */ void **i_indirect; /* indirect blocks */ unsigned long swapped; - int locked; /* into memory */ + unsigned long flags; struct list_head list; struct inode vfs_inode; }; -- cgit v1.2.3