Lines Matching full:flags
117 unsigned long flags);
151 * Applies per-task gfp context to the given allocation flags.
156 static inline gfp_t current_gfp_context(gfp_t flags) in current_gfp_context() argument
158 unsigned int pflags = READ_ONCE(current->flags); in current_gfp_context()
166 flags &= ~(__GFP_IO | __GFP_FS); in current_gfp_context()
168 flags &= ~__GFP_FS; in current_gfp_context()
171 flags &= ~__GFP_MOVABLE; in current_gfp_context()
173 return flags; in current_gfp_context()
190 * @gfp_mask: gfp_t flags that would be used to allocate
210 * point of view. Use memalloc_noio_restore to end the scope with flags
217 unsigned int flags = current->flags & PF_MEMALLOC_NOIO; in memalloc_noio_save() local
218 current->flags |= PF_MEMALLOC_NOIO; in memalloc_noio_save()
219 return flags; in memalloc_noio_save()
224 * @flags: Flags to restore.
227 * Always make sure that the given flags is the return value from the
230 static inline void memalloc_noio_restore(unsigned int flags) in memalloc_noio_restore() argument
232 current->flags = (current->flags & ~PF_MEMALLOC_NOIO) | flags; in memalloc_noio_restore()
241 * point of view. Use memalloc_nofs_restore to end the scope with flags
248 unsigned int flags = current->flags & PF_MEMALLOC_NOFS; in memalloc_nofs_save() local
249 current->flags |= PF_MEMALLOC_NOFS; in memalloc_nofs_save()
250 return flags; in memalloc_nofs_save()
255 * @flags: Flags to restore.
258 * Always make sure that the given flags is the return value from the
261 static inline void memalloc_nofs_restore(unsigned int flags) in memalloc_nofs_restore() argument
263 current->flags = (current->flags & ~PF_MEMALLOC_NOFS) | flags; in memalloc_nofs_restore()
268 unsigned int flags = current->flags & PF_MEMALLOC; in memalloc_noreclaim_save() local
269 current->flags |= PF_MEMALLOC; in memalloc_noreclaim_save()
270 return flags; in memalloc_noreclaim_save()
273 static inline void memalloc_noreclaim_restore(unsigned int flags) in memalloc_noreclaim_restore() argument
275 current->flags = (current->flags & ~PF_MEMALLOC) | flags; in memalloc_noreclaim_restore()
280 unsigned int flags = current->flags & PF_MEMALLOC_PIN; in memalloc_pin_save() local
282 current->flags |= PF_MEMALLOC_PIN; in memalloc_pin_save()
283 return flags; in memalloc_pin_save()
286 static inline void memalloc_pin_restore(unsigned int flags) in memalloc_pin_restore() argument
288 current->flags = (current->flags & ~PF_MEMALLOC_PIN) | flags; in memalloc_pin_restore()