/mm/ |
D | memfd.c | 120 static unsigned int *memfd_file_seals_ptr(struct file *file) in memfd_file_seals_ptr() argument 122 if (shmem_file(file)) in memfd_file_seals_ptr() 123 return &SHMEM_I(file_inode(file))->seals; in memfd_file_seals_ptr() 126 if (is_file_hugepages(file)) in memfd_file_seals_ptr() 127 return &HUGETLBFS_I(file_inode(file))->seals; in memfd_file_seals_ptr() 139 static int memfd_add_seals(struct file *file, unsigned int seals) in memfd_add_seals() argument 141 struct inode *inode = file_inode(file); in memfd_add_seals() 176 if (!(file->f_mode & FMODE_WRITE)) in memfd_add_seals() 183 file_seals = memfd_file_seals_ptr(file); in memfd_add_seals() 195 error = mapping_deny_writable(file->f_mapping); in memfd_add_seals() [all …]
|
D | fadvise.c | 30 int generic_fadvise(struct file *file, loff_t offset, loff_t len, int advice) in generic_fadvise() argument 40 inode = file_inode(file); in generic_fadvise() 44 mapping = file->f_mapping; in generic_fadvise() 79 file->f_ra.ra_pages = bdi->ra_pages; in generic_fadvise() 80 spin_lock(&file->f_lock); in generic_fadvise() 81 file->f_mode &= ~FMODE_RANDOM; in generic_fadvise() 82 spin_unlock(&file->f_lock); in generic_fadvise() 85 spin_lock(&file->f_lock); in generic_fadvise() 86 file->f_mode |= FMODE_RANDOM; in generic_fadvise() 87 spin_unlock(&file->f_lock); in generic_fadvise() [all …]
|
D | filemap.c | 596 int file_fdatawait_range(struct file *file, loff_t start_byte, loff_t end_byte) in file_fdatawait_range() argument 598 struct address_space *mapping = file->f_mapping; in file_fdatawait_range() 601 return file_check_and_advance_wb_err(file); in file_fdatawait_range() 732 int file_check_and_advance_wb_err(struct file *file) in file_check_and_advance_wb_err() argument 735 errseq_t old = READ_ONCE(file->f_wb_err); in file_check_and_advance_wb_err() 736 struct address_space *mapping = file->f_mapping; in file_check_and_advance_wb_err() 741 spin_lock(&file->f_lock); in file_check_and_advance_wb_err() 742 old = file->f_wb_err; in file_check_and_advance_wb_err() 744 &file->f_wb_err); in file_check_and_advance_wb_err() 745 trace_file_check_and_advance_wb_err(file, old); in file_check_and_advance_wb_err() [all …]
|
D | mmap.c | 140 struct file *file, struct address_space *mapping) in __remove_shared_vm_struct() argument 143 atomic_inc(&file_inode(file)->i_writecount); in __remove_shared_vm_struct() 158 struct file *file = vma->vm_file; in unlink_file_vma() local 160 if (file) { in unlink_file_vma() 161 struct address_space *mapping = file->f_mapping; in unlink_file_vma() 163 __remove_shared_vm_struct(vma, file, mapping); in unlink_file_vma() 616 struct file *file; in __vma_link_file() local 618 file = vma->vm_file; in __vma_link_file() 619 if (file) { in __vma_link_file() 620 struct address_space *mapping = file->f_mapping; in __vma_link_file() [all …]
|
D | nommu.c | 780 static int validate_mmap_request(struct file *file, in validate_mmap_request() argument 811 if (file) { in validate_mmap_request() 813 if (!file->f_op->mmap) in validate_mmap_request() 820 if (file->f_op->mmap_capabilities) { in validate_mmap_request() 821 capabilities = file->f_op->mmap_capabilities(file); in validate_mmap_request() 825 switch (file_inode(file)->i_mode & S_IFMT) { in validate_mmap_request() 845 if (!file->f_op->get_unmapped_area) in validate_mmap_request() 847 if (!(file->f_mode & FMODE_CAN_READ)) in validate_mmap_request() 851 if (!(file->f_mode & FMODE_READ)) in validate_mmap_request() 857 !(file->f_mode & FMODE_WRITE)) in validate_mmap_request() [all …]
|
D | msync.c | 63 struct file *file; in SYSCALL_DEFINE3() local 83 file = vma->vm_file; in SYSCALL_DEFINE3() 88 if ((flags & MS_SYNC) && file && in SYSCALL_DEFINE3() 90 get_file(file); in SYSCALL_DEFINE3() 92 error = vfs_fsync_range(file, fstart, fend, 1); in SYSCALL_DEFINE3() 93 fput(file); in SYSCALL_DEFINE3()
|
D | readahead.c | 116 static int read_pages(struct address_space *mapping, struct file *filp, in read_pages() 156 struct file *filp, pgoff_t offset, unsigned long nr_to_read, in __do_page_cache_readahead() 222 int force_page_cache_readahead(struct address_space *mapping, struct file *filp, in force_page_cache_readahead() 383 struct file_ra_state *ra, struct file *filp, in ondemand_readahead() 510 struct file_ra_state *ra, struct file *filp, in page_cache_sync_readahead() 548 struct file_ra_state *ra, struct file *filp, in page_cache_async_readahead() 585 if (!f.file || !(f.file->f_mode & FMODE_READ)) in ksys_readahead() 594 if (!f.file->f_mapping || !f.file->f_mapping->a_ops || in ksys_readahead() 595 !S_ISREG(file_inode(f.file)->i_mode)) in ksys_readahead() 598 ret = vfs_fadvise(f.file, offset, count, POSIX_FADV_WILLNEED); in ksys_readahead()
|
D | shmem.c | 2025 struct file *fpin; in shmem_fault() 2073 unsigned long shmem_get_unmapped_area(struct file *file, in shmem_get_unmapped_area() argument 2077 unsigned long (*get_area)(struct file *, in shmem_get_unmapped_area() 2089 addr = get_area(file, uaddr, len, pgoff, flags); in shmem_get_unmapped_area() 2118 if (file) { in shmem_get_unmapped_area() 2119 VM_BUG_ON(file->f_op != &shmem_file_operations); in shmem_get_unmapped_area() 2120 sb = file_inode(file)->i_sb; in shmem_get_unmapped_area() 2180 int shmem_lock(struct file *file, int lock, struct user_struct *user) in shmem_lock() argument 2182 struct inode *inode = file_inode(file); in shmem_lock() 2191 mapping_set_unevictable(file->f_mapping); in shmem_lock() [all …]
|
D | swap.c | 266 int file, int rotated) in update_page_reclaim_stat() argument 270 reclaim_stat->recent_scanned[file]++; in update_page_reclaim_stat() 272 reclaim_stat->recent_rotated[file]++; in update_page_reclaim_stat() 279 int file = page_is_file_cache(page); in __activate_page() local 289 update_page_reclaim_stat(lruvec, file, 1); in __activate_page() 499 int lru, file; in lru_deactivate_file_fn() local 513 file = page_is_file_cache(page); in lru_deactivate_file_fn() 539 update_page_reclaim_stat(lruvec, file, 0); in lru_deactivate_file_fn() 546 int file = page_is_file_cache(page); in lru_deactivate_fn() local 555 update_page_reclaim_stat(lruvec, file, 0); in lru_deactivate_fn() [all …]
|
D | madvise.c | 257 struct file *file = vma->vm_file; in madvise_willneed() local 262 if (!file) { in madvise_willneed() 268 if (shmem_mapping(file->f_mapping)) { in madvise_willneed() 270 file->f_mapping); in madvise_willneed() 274 if (!file) in madvise_willneed() 278 if (IS_DAX(file_inode(file))) { in madvise_willneed() 290 get_file(file); in madvise_willneed() 294 vfs_fadvise(file, offset, end - start, POSIX_FADV_WILLNEED); in madvise_willneed() 295 fput(file); in madvise_willneed() 820 struct file *f; in madvise_remove()
|
D | vmscan.c | 1828 static int too_many_isolated(struct pglist_data *pgdat, int file, in too_many_isolated() argument 1839 if (file) { in too_many_isolated() 1956 int file = is_file_lru(lru); in shrink_inactive_list() local 1962 while (unlikely(too_many_isolated(pgdat, file, sc))) { in shrink_inactive_list() 1982 __mod_node_page_state(pgdat, NR_ISOLATED_ANON + file, nr_taken); in shrink_inactive_list() 1983 reclaim_stat->recent_scanned[file] += nr_taken; in shrink_inactive_list() 2008 __mod_node_page_state(pgdat, NR_ISOLATED_ANON + file, -nr_taken); in shrink_inactive_list() 2035 if (file) in shrink_inactive_list() 2039 nr_scanned, nr_reclaimed, &stat, sc->priority, file); in shrink_inactive_list() 2058 int file = is_file_lru(lru); in shrink_active_list() local [all …]
|
D | page_idle.c | 121 static ssize_t page_idle_bitmap_read(struct file *file, struct kobject *kobj, in page_idle_bitmap_read() argument 166 static ssize_t page_idle_bitmap_write(struct file *file, struct kobject *kobj, in page_idle_bitmap_write() argument
|
D | khugepaged.c | 1493 struct file *file, pgoff_t start, in collapse_file() argument 1496 struct address_space *mapping = file->f_mapping; in collapse_file() 1504 bool is_shmem = shmem_file(file); in collapse_file() 1595 page_cache_sync_readahead(mapping, &file->f_ra, in collapse_file() 1596 file, index, in collapse_file() 1815 struct file *file, pgoff_t start, struct page **hpage) in khugepaged_scan_file() argument 1818 struct address_space *mapping = file->f_mapping; in khugepaged_scan_file() 1883 collapse_file(mm, file, start, hpage, node); in khugepaged_scan_file() 1891 struct file *file, pgoff_t start, struct page **hpage) in khugepaged_scan_file() argument 1971 struct file *file; in khugepaged_scan_mm_slot() local [all …]
|
D | internal.h | 53 struct file *filp, pgoff_t offset, unsigned long nr_to_read, 60 struct address_space *mapping, struct file *filp) in ra_submit() 365 static inline struct file *maybe_unlock_mmap_for_io(struct vm_fault *vmf, in maybe_unlock_mmap_for_io() 366 struct file *fpin) in maybe_unlock_mmap_for_io() 495 extern unsigned long __must_check vm_mmap_pgoff(struct file *, unsigned long,
|
D | util.c | 483 unsigned long vm_mmap_pgoff(struct file *file, unsigned long addr, in vm_mmap_pgoff() argument 492 ret = security_mmap_file(file, prot, flag); in vm_mmap_pgoff() 496 ret = do_mmap_pgoff(file, addr, len, prot, flag, pgoff, in vm_mmap_pgoff() 506 unsigned long vm_mmap(struct file *file, unsigned long addr, in vm_mmap() argument 515 return vm_mmap_pgoff(file, addr, len, prot, flag, offset >> PAGE_SHIFT); in vm_mmap()
|
D | swapfile.c | 2295 struct file *swap_file = sis->swap_file; in destroy_swap_extents() 2383 struct file *swap_file = sis->swap_file; in setup_swap_extents() 2521 struct file *swap_file, *victim; in SYSCALL_DEFINE1() 2694 static __poll_t swaps_poll(struct file *file, poll_table *wait) in swaps_poll() argument 2696 struct seq_file *seq = file->private_data; in swaps_poll() 2698 poll_wait(file, &proc_poll_wait, wait); in swaps_poll() 2758 struct file *file; in swap_show() local 2766 file = si->swap_file; in swap_show() 2767 len = seq_file_path(swap, file, " \t\n\\"); in swap_show() 2770 S_ISBLK(file_inode(file)->i_mode) ? in swap_show() [all …]
|
D | page_io.c | 148 struct file *swap_file, in generic_swapfile_activate() 288 struct file *swap_file = sis->swap_file; in __swap_writepage() 378 struct file *swap_file = sis->swap_file; in swap_readpage()
|
D | slab.h | 243 struct file; 260 ssize_t slabinfo_write(struct file *file, const char __user *buffer,
|
D | vmstat.c | 2073 static int unusable_open(struct inode *inode, struct file *file) in unusable_open() argument 2075 return seq_open(file, &unusable_op); in unusable_open() 2125 static int extfrag_open(struct inode *inode, struct file *file) in extfrag_open() argument 2127 return seq_open(file, &extfrag_op); in extfrag_open()
|
D | kmemleak.c | 1698 static int kmemleak_open(struct inode *inode, struct file *file) in kmemleak_open() argument 1700 return seq_open(file, &kmemleak_seq_ops); in kmemleak_open() 1767 static ssize_t kmemleak_write(struct file *file, const char __user *user_buf, in kmemleak_write() argument
|
D | page_owner.c | 457 read_page_owner(struct file *file, char __user *buf, size_t count, loff_t *ppos) in read_page_owner() argument
|
D | gup_benchmark.c | 95 static long gup_benchmark_ioctl(struct file *filep, unsigned int cmd, in gup_benchmark_ioctl()
|
D | slab_common.c | 1571 static int slabinfo_open(struct inode *inode, struct file *file) in slabinfo_open() argument 1573 return seq_open(file, &slabinfo_op); in slabinfo_open()
|
D | memcontrol.c | 4605 static void memcg_event_ptable_queue_proc(struct file *file, in memcg_event_ptable_queue_proc() argument 4660 if (!efile.file) { in memcg_write_event_control() 4665 event->eventfd = eventfd_ctx_fileget(efile.file); in memcg_write_event_control() 4672 if (!cfile.file) { in memcg_write_event_control() 4679 ret = inode_permission(file_inode(cfile.file), MAY_READ); in memcg_write_event_control() 4691 name = cfile.file->f_path.dentry->d_name.name; in memcg_write_event_control() 4715 cfile_css = css_tryget_online_from_dir(cfile.file->f_path.dentry->d_parent, in memcg_write_event_control() 4729 vfs_poll(efile.file, &event->pt); in memcg_write_event_control()
|
D | Kconfig | 445 filesystem wishes to access a page in a file on disk, it first 720 Allow khugepaged to put read-only file-backed pages in THP. 723 support of file THPs will be developed in the next few release
|