/mm/ |
H A D | msync.c | 13 #include <linux/file.h> 18 * MS_SYNC syncs the entire file - including mappings. 60 struct file *file; local 79 file = vma->vm_file; 81 if ((flags & MS_SYNC) && file && 83 get_file(file); 85 error = vfs_fsync(file, 0); 86 fput(file);
|
H A D | fadvise.c | 11 #include <linux/file.h> 29 struct file *file = fget(fd); local 38 if (!file) 41 if (S_ISFIFO(file->f_path.dentry->d_inode->i_mode)) { 46 mapping = file->f_mapping; 79 file->f_ra.ra_pages = bdi->ra_pages; 80 spin_lock(&file->f_lock); 81 file->f_mode &= ~FMODE_RANDOM; 82 spin_unlock(&file [all...] |
H A D | fremap.c | 11 #include <linux/file.h> 53 * Install a file pte to a given virtual memory address, release any 72 * We don't need to run update_mmu_cache() here because the "file pte" 74 * non-present entry (like a swap entry), noting what file offset should 108 * @pgoff: to-be-mapped page of the backing store file 112 * (shared backing store file). 115 * way to map the same (large) file into a given virtual window. Unlike 199 struct file *file = vma->vm_file; local 202 get_file(file); [all...] |
H A D | madvise.c | 128 struct file *file = vma->vm_file; local 130 if (!file) 133 if (file->f_mapping->a_ops->get_xip_mem) { 144 force_page_cache_readahead(file->f_mapping, file, start, end - start); 188 * This is effectively punching a hole into the middle of a file. 342 * -EBADF - map exists, but area maps something that isn't a file.
|
H A D | filemap_xip.c | 45 * This is a file read routine for execute in place files, and uses 49 * Note the struct file* is not used at all. It may be NULL. 54 struct file *filp, 147 xip_file_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos) 217 * mapped memory region to read in file data during a page fault. 223 struct file *file = vma->vm_file; local 224 struct address_space *mapping = file->f_mapping; 309 int xip_file_mmap(struct file * file, struc argument [all...] |
H A D | ashmem.c | 20 #include <linux/file.h> 39 * Lifecycle: From our parent file's open() until its release() 46 struct file *file; /* the shmem-based backing file */ member in struct:ashmem_area 176 static int ashmem_open(struct inode *inode, struct file *file) argument 181 ret = generic_file_open(inode, file); 192 file->private_data = asma; 197 static int ashmem_release(struct inode *ignored, struct file *fil argument 214 ashmem_read(struct file *file, char __user *buf, size_t len, loff_t *pos) argument 245 ashmem_llseek(struct file *file, loff_t offset, int origin) argument 283 ashmem_mmap(struct file *file, struct vm_area_struct *vma) argument 629 ashmem_ioctl(struct file *file, unsigned int cmd, unsigned long arg) argument [all...] |
H A D | swap.c | 8 * This file contains the default values for the operation of the 279 int file, int rotated) 286 reclaim_stat->recent_scanned[file]++; 288 reclaim_stat->recent_rotated[file]++; 293 memcg_reclaim_stat->recent_scanned[file]++; 295 memcg_reclaim_stat->recent_rotated[file]++; 303 int file = page_is_file_cache(page); local 312 update_page_reclaim_stat(zone, page, file, 1); 448 int lru, file; local 464 file 278 update_page_reclaim_stat(struct zone *zone, struct page *page, int file, int rotated) argument 664 const int file = 0; local 699 int file = is_file_lru(lru); local [all...] |
H A D | backing-dev.c | 104 static int bdi_debug_stats_open(struct inode *inode, struct file *file) argument 106 return single_open(file, bdi_debug_stats_show, inode->i_private);
|
H A D | memblock.c | 839 static int memblock_debug_open(struct inode *inode, struct file *file) argument 841 return single_open(file, memblock_debug_show, inode->i_private);
|
H A D | vmstat.c | 909 * It is expensive to collect so do not constantly read the file. 935 static int fragmentation_open(struct inode *inode, struct file *file) argument 937 return seq_open(file, &fragmentation_op); 954 static int pagetypeinfo_open(struct inode *inode, struct file *file) argument 956 return seq_open(file, &pagetypeinfo_op); 1045 static int zoneinfo_open(struct inode *inode, struct file *file) argument 1047 return seq_open(file, 1127 vmstat_open(struct inode *inode, struct file *file) argument 1294 unusable_open(struct inode *inode, struct file *file) argument 1346 extfrag_open(struct inode *inode, struct file *file) argument [all...] |
H A D | filemap.c | 8 * This file handles the generic file mmap semantics used by 24 #include <linux/file.h> 351 * filemap_write_and_wait_range - write out & wait on a file range 356 * Write out and wait upon file offsets lstart->lend, inclusive. 359 * that this function can be used to write to the very end-of-file (end = -1). 1050 static void shrink_readahead_size_eio(struct file *filp, 1057 * do_generic_file_read - generic file read routine 1058 * @filp: the file to read 1059 * @ppos: current file positio 1482 struct file *file; local 1515 page_cache_read(struct file *file, pgoff_t offset) argument 1545 do_sync_mmap_readahead(struct vm_area_struct *vma, struct file_ra_state *ra, struct file *file, pgoff_t offset) argument 1590 do_async_mmap_readahead(struct vm_area_struct *vma, struct file_ra_state *ra, struct file *file, struct page *page, pgoff_t offset) argument 1623 struct file *file = vma->vm_file; local 1747 generic_file_mmap(struct file * file, struct vm_area_struct * vma) argument 1762 generic_file_readonly_mmap(struct file *file, struct vm_area_struct *vma) argument 1769 generic_file_mmap(struct file * file, struct vm_area_struct * vma) argument 1773 generic_file_readonly_mmap(struct file * file, struct vm_area_struct * vma) argument 1965 file_remove_suid(struct file *file) argument 2141 generic_write_checks(struct file *file, loff_t *pos, size_t *count, int isblk) argument 2216 pagecache_write_begin(struct file *file, struct address_space *mapping, loff_t pos, unsigned len, unsigned flags, struct page **pagep, void **fsdata) argument 2227 pagecache_write_end(struct file *file, struct address_space *mapping, loff_t pos, unsigned len, unsigned copied, struct page *page, void *fsdata) argument 2243 struct file *file = iocb->ki_filp; local 2342 generic_perform_write(struct file *file, struct iov_iter *i, loff_t pos) argument 2436 struct file *file = iocb->ki_filp; local 2474 struct file *file = iocb->ki_filp; local 2582 struct file *file = iocb->ki_filp; local [all...] |
H A D | kmemleak.c | 52 * prevents multiple users of the "kmemleak" debugfs file together with 214 /* protects the memory scanning, parameters and debug/kmemleak file access */ 278 * Printing of the objects hex dump to the seq file. The number of lines to be 279 * printed is limited to HEX_MAX_LINES to prevent seq file spamming. The 341 * Printing of the unreferenced objects information to the seq file. The 1447 * Print the information for an unreferenced object to the seq file. 1468 static int kmemleak_open(struct inode *inode, struct file *file) argument 1473 return seq_open(file, &kmemleak_seq_ops); 1476 static int kmemleak_release(struct inode *inode, struct file *fil argument 1539 kmemleak_write(struct file *file, const char __user *user_buf, size_t size, loff_t *ppos) argument [all...] |
H A D | mmap.c | 19 #include <linux/file.h> 200 struct file *file, struct address_space *mapping) 203 atomic_inc(&file->f_path.dentry->d_inode->i_writecount); 216 * Unlink a file-based vm structure from its prio_tree, to hide 221 struct file *file = vma->vm_file; local 223 if (file) { 224 struct address_space *mapping = file->f_mapping; 226 __remove_shared_vm_struct(vma, file, mappin 199 __remove_shared_vm_struct(struct vm_area_struct *vma, struct file *file, struct address_space *mapping) argument 410 struct file *file; local 507 struct file *file = vma->vm_file; local 658 is_mergeable_vma(struct vm_area_struct *vma, struct file *file, unsigned long vm_flags) argument 697 can_vma_merge_before(struct vm_area_struct *vma, unsigned long vm_flags, struct anon_vma *anon_vma, struct file *file, pgoff_t vm_pgoff) argument 716 can_vma_merge_after(struct vm_area_struct *vma, unsigned long vm_flags, struct anon_vma *anon_vma, struct file *file, pgoff_t vm_pgoff) argument 758 vma_merge(struct mm_struct *mm, struct vm_area_struct *prev, unsigned long addr, unsigned long end, unsigned long vm_flags, struct anon_vma *anon_vma, struct file *file, pgoff_t pgoff, struct mempolicy *policy) argument 929 vm_stat_account(struct mm_struct *mm, unsigned long flags, struct file *file, long pages) argument 950 do_mmap_pgoff(struct file *file, unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags, unsigned long pgoff) argument 1092 struct file *file = NULL; local 1189 accountable_mapping(struct file *file, vm_flags_t vm_flags) argument 1201 mmap_region(struct file *file, unsigned long addr, unsigned long len, unsigned long flags, vm_flags_t vm_flags, unsigned long pgoff) argument 1545 get_unmapped_area(struct file *file, unsigned long addr, unsigned long len, unsigned long pgoff, unsigned long flags) argument [all...] |
H A D | nommu.c | 20 #include <linux/file.h> 482 * to a regular file. in this case, the unmapping will need 483 * to invoke file system routines that need the global lock. 884 static int validate_mmap_request(struct file *file, argument 920 if (file) { 921 /* validate file mapping requests */ 925 if (!file->f_op || !file->f_op->mmap) 932 mapping = file 1064 determine_vm_flags(struct file *file, unsigned long prot, unsigned long flags, unsigned long capabilities) argument 1237 do_mmap_pgoff(struct file *file, unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags, unsigned long pgoff) argument 1480 struct file *file = NULL; local 1844 arch_get_unmapped_area(struct file *file, unsigned long addr, unsigned long len, unsigned long pgoff, unsigned long flags) argument [all...] |
H A D | swapfile.c | 52 static const char Bad_file[] = "Bad swap file entry "; 53 static const char Unused_file[] = "Unused swap file entry "; 1402 * Whether the swapdev is an S_ISREG file or an S_ISBLK blockdev, the swap 1406 * For S_ISREG swapfiles, setup_swap_extents() will walk all the file's blocks 1553 struct file *swap_file, *victim; 1687 static unsigned swaps_poll(struct file *file, poll_table *wait) argument 1689 struct proc_swaps *s = file->private_data; 1691 poll_wait(file, &proc_poll_wait, wait); 1755 struct file *fil local 1782 swaps_open(struct inode *inode, struct file *file) argument [all...] |
H A D | vmalloc.c | 2587 static int vmalloc_open(struct inode *inode, struct file *file) argument 2597 ret = seq_open(file, &vmalloc_op); 2599 struct seq_file *m = file->private_data;
|
H A D | shmem.c | 20 * This file is released under the GPL. 28 #include <linux/file.h> 69 * The maximum size of a shmem/tmpfs file is limited by the maximum size of 72 * With 4kB page size, maximum file size is just over 2TB on a 32-bit kernel, 74 * file size is just over 4TB on a 64-bit kernel, but 16TB on a 32-bit kernel, 457 /* another task gave its page, or truncated the file */ 1576 int shmem_lock(struct file *file, int lock, struct user_struct *user) argument 1578 struct inode *inode = file->f_path.dentry->d_inode; 1587 mapping_set_unevictable(file 1602 shmem_mmap(struct file *file, struct vm_area_struct *vma) argument 1677 shmem_readpage(struct file *file, struct page *page) argument 1686 shmem_write_begin(struct file *file, struct address_space *mapping, loff_t pos, unsigned len, unsigned flags, struct page **pagep, void **fsdata) argument 1697 shmem_write_end(struct file *file, struct address_space *mapping, loff_t pos, unsigned len, unsigned copied, struct page *page, void *fsdata) argument 2907 shmem_lock(struct file *file, int lock, struct user_struct *user) argument 2963 struct file *file; local 3018 shmem_set_file(struct vm_area_struct *vma, struct file *file) argument 3033 struct file *file; local [all...] |
H A D | vmscan.c | 23 #include <linux/file.h> 673 * to look twice if a mapped file page is used more 975 int __isolate_lru_page(struct page *page, int mode, int file) argument 991 if (mode != ISOLATE_BOTH && page_is_file_cache(page) != file) 1033 * @file: True [1] if isolating file [!anon] pages 1039 unsigned long *scanned, int order, int mode, int file) 1059 switch (__isolate_lru_page(page, mode, file)) { 1118 if (__isolate_lru_page(cursor_page, mode, file) == 0) { 1165 int active, int file) 1037 isolate_lru_pages(unsigned long nr_to_scan, struct list_head *src, struct list_head *dst, unsigned long *scanned, int order, int mode, int file) argument 1161 isolate_pages_global(unsigned long nr, struct list_head *dst, unsigned long *scanned, int order, int mode, struct zone *z, int active, int file) argument 1253 too_many_isolated(struct zone *zone, int file, struct scan_control *sc) argument 1308 int file = is_file_lru(lru); local 1402 shrink_inactive_list(unsigned long nr_to_scan, struct zone *zone, struct scan_control *sc, int priority, int file) argument 1533 shrink_active_list(unsigned long nr_pages, struct zone *zone, struct scan_control *sc, int priority, int file) argument 1709 inactive_list_is_low(struct zone *zone, struct scan_control *sc, int file) argument 1721 int file = is_file_lru(lru); local 1743 unsigned long anon, file, free; local 1844 int file = is_file_lru(l); local [all...] |
H A D | slab.c | 144 /* Shouldn't this be in a header file somewhere? */ 4312 * @file: unused 4317 static ssize_t slabinfo_write(struct file *file, const char __user *buffer, argument 4360 static int slabinfo_open(struct inode *inode, struct file *file) argument 4362 return seq_open(file, &slabinfo_op); 4508 static int slabstats_open(struct inode *inode, struct file *file) argument 4513 ret = seq_open(file, [all...] |
H A D | slub.c | 4890 static int slabinfo_open(struct inode *inode, struct file *file) argument 4892 return seq_open(file, &slabinfo_op);
|
H A D | memcontrol.c | 87 MEM_CGROUP_STAT_FILE_MAPPED, /* # of pages charged as file rss */ 295 MOVE_CHARGE_TYPE_FILE, /* file page(including tmpfs) and swap of it */ 343 /* for encoding cft->private value on file */ 617 bool file, int nr_pages) 621 if (file) 1256 int active, int file) 1267 int lru = LRU_FILE * file + active; 1288 ret = __isolate_lru_page(page, mode, file); 1931 * Currently used to update mapped file statistics, but the routine can be 1941 * file 616 mem_cgroup_charge_statistics(struct mem_cgroup *mem, bool file, int nr_pages) argument 1251 mem_cgroup_isolate_pages(unsigned long nr_to_scan, struct list_head *dst, unsigned long *scanned, int order, int mode, struct zone *z, struct mem_cgroup *mem_cont, int active, int file) argument 4709 mem_control_numa_stat_open(struct inode *unused, struct file *file) argument [all...] |