Lines Matching defs:flags

164 static inline int shmem_acct_size(unsigned long flags, loff_t size)
166 return (flags & VM_NORESERVE) ?
170 static inline void shmem_unacct_size(unsigned long flags, loff_t size)
172 if (!(flags & VM_NORESERVE))
176 static inline int shmem_reacct_size(unsigned long flags,
179 if (!(flags & VM_NORESERVE)) {
195 static inline int shmem_acct_blocks(unsigned long flags, long pages)
197 if (!(flags & VM_NORESERVE))
204 static inline void shmem_unacct_blocks(unsigned long flags, long pages)
206 if (flags & VM_NORESERVE)
216 if (shmem_acct_blocks(info->flags, pages))
239 shmem_unacct_blocks(info->flags, pages);
253 shmem_unacct_blocks(info->flags, pages);
292 sb_dqopt(sb)->flags |= DQUOT_QUOTA_SYS_FILE | DQUOT_NOLIST_DIRTY;
551 if (mm && ((vm_flags & VM_NOHUGEPAGE) || test_bit(MMF_DISABLE_THP, &mm->flags)))
1182 error = shmem_reacct_size(SHMEM_I(inode)->flags,
1239 shmem_unacct_size(info->flags, inode->i_size);
1439 if (WARN_ON_ONCE((info->flags & VM_LOCKED) || sbinfo->noswap))
1584 * Some of the flags set permissions, while others set limitations.
1597 * Minimize the result gfp by taking the union with the deny flags,
1598 * and the intersection of the allow flags.
2139 * @sgp: SGP_* flags to control behavior
2151 * - for all other flags a new folio is allocated, inserted into the
2268 unsigned long pgoff, unsigned long flags)
2280 flags);
2295 if (flags & MAP_FIXED)
2338 inflated_len, 0, flags);
2405 * What serializes the accesses to info->flags?
2409 if (lock && !(info->flags & VM_LOCKED)) {
2412 info->flags |= VM_LOCKED;
2415 if (!lock && (info->flags & VM_LOCKED) && ucounts) {
2417 info->flags &= ~VM_LOCKED;
2491 dev_t dev, unsigned long flags)
2519 info->flags = flags & VM_NORESERVE;
2569 umode_t mode, dev_t dev, unsigned long flags)
2574 inode = __shmem_get_inode(idmap, sb, dir, mode, dev, flags);
2597 umode_t mode, dev_t dev, unsigned long flags)
2599 return __shmem_get_inode(idmap, sb, dir, mode, dev, flags);
2608 uffd_flags_t flags,
2640 if (uffd_flags_mode_is(flags, MFILL_ATOMIC_COPY)) {
2701 &folio->page, true, flags);
2972 size_t len, unsigned int flags)
3447 unsigned int flags)
3453 if (flags & ~(RENAME_NOREPLACE | RENAME_EXCHANGE | RENAME_WHITEOUT))
3456 if (flags & RENAME_EXCHANGE)
3463 if (flags & RENAME_WHITEOUT) {
3610 if (fa->flags & ~SHMEM_FL_USER_MODIFIABLE)
3614 (fa->flags & SHMEM_FL_USER_MODIFIABLE);
3707 size_t size, int flags)
3727 old_xattr = simple_xattr_set(&info->xattrs, name, value, size, flags);
4800 unsigned long pgoff, unsigned long flags)
4802 return mm_get_unmapped_area(current->mm, file, addr, len, pgoff, flags);
4815 #define shmem_acct_size(flags, size) 0
4816 #define shmem_unacct_size(flags, size) do {} while (0)
4820 umode_t mode, dev_t dev, unsigned long flags)
4831 loff_t size, unsigned long flags, unsigned int i_flags)
4842 if (shmem_acct_size(flags, size))
4849 S_IFREG | S_IRWXUGO, 0, flags);
4851 shmem_unacct_size(flags, size);
4874 * @flags: VM_NORESERVE suppresses pre-accounting of the entire object size
4876 struct file *shmem_kernel_file_setup(const char *name, loff_t size, unsigned long flags)
4878 return __shmem_file_setup(shm_mnt, name, size, flags, S_PRIVATE);
4886 * @flags: VM_NORESERVE suppresses pre-accounting of the entire object size
4888 struct file *shmem_file_setup(const char *name, loff_t size, unsigned long flags)
4890 return __shmem_file_setup(shm_mnt, name, size, flags, 0);
4899 * @flags: VM_NORESERVE suppresses pre-accounting of the entire object size
4902 loff_t size, unsigned long flags)
4904 return __shmem_file_setup(mnt, name, size, flags, 0);
4936 * shmem_read_folio_gfp - read into page cache, using specified page allocation flags.
4939 * @gfp: the page allocator flags to use if allocating
4942 * with any new page allocations done using the specified allocation flags.