Lines Matching refs:mapping
30 static inline void mapping_set_error(struct address_space *mapping, int error) in mapping_set_error() argument
34 set_bit(AS_ENOSPC, &mapping->flags); in mapping_set_error()
36 set_bit(AS_EIO, &mapping->flags); in mapping_set_error()
40 static inline void mapping_set_unevictable(struct address_space *mapping) in mapping_set_unevictable() argument
42 set_bit(AS_UNEVICTABLE, &mapping->flags); in mapping_set_unevictable()
45 static inline void mapping_clear_unevictable(struct address_space *mapping) in mapping_clear_unevictable() argument
47 clear_bit(AS_UNEVICTABLE, &mapping->flags); in mapping_clear_unevictable()
50 static inline int mapping_unevictable(struct address_space *mapping) in mapping_unevictable() argument
52 if (mapping) in mapping_unevictable()
53 return test_bit(AS_UNEVICTABLE, &mapping->flags); in mapping_unevictable()
54 return !!mapping; in mapping_unevictable()
57 static inline void mapping_set_exiting(struct address_space *mapping) in mapping_set_exiting() argument
59 set_bit(AS_EXITING, &mapping->flags); in mapping_set_exiting()
62 static inline int mapping_exiting(struct address_space *mapping) in mapping_exiting() argument
64 return test_bit(AS_EXITING, &mapping->flags); in mapping_exiting()
67 static inline gfp_t mapping_gfp_mask(struct address_space * mapping) in mapping_gfp_mask() argument
69 return (__force gfp_t)mapping->flags & __GFP_BITS_MASK; in mapping_gfp_mask()
73 static inline gfp_t mapping_gfp_constraint(struct address_space *mapping, in mapping_gfp_constraint() argument
76 return mapping_gfp_mask(mapping) & gfp_mask; in mapping_gfp_constraint()
248 pgoff_t page_cache_next_hole(struct address_space *mapping,
250 pgoff_t page_cache_prev_hole(struct address_space *mapping,
260 struct page *pagecache_get_page(struct address_space *mapping, pgoff_t offset,
273 static inline struct page *find_get_page(struct address_space *mapping, in find_get_page() argument
276 return pagecache_get_page(mapping, offset, 0, 0); in find_get_page()
279 static inline struct page *find_get_page_flags(struct address_space *mapping, in find_get_page_flags() argument
282 return pagecache_get_page(mapping, offset, fgp_flags, 0); in find_get_page_flags()
299 static inline struct page *find_lock_page(struct address_space *mapping, in find_lock_page() argument
302 return pagecache_get_page(mapping, offset, FGP_LOCK, 0); in find_lock_page()
324 static inline struct page *find_or_create_page(struct address_space *mapping, in find_or_create_page() argument
327 return pagecache_get_page(mapping, offset, in find_or_create_page()
345 static inline struct page *grab_cache_page_nowait(struct address_space *mapping, in grab_cache_page_nowait() argument
348 return pagecache_get_page(mapping, index, in grab_cache_page_nowait()
350 mapping_gfp_mask(mapping)); in grab_cache_page_nowait()
353 struct page *find_get_entry(struct address_space *mapping, pgoff_t offset);
354 struct page *find_lock_entry(struct address_space *mapping, pgoff_t offset);
355 unsigned find_get_entries(struct address_space *mapping, pgoff_t start,
358 unsigned find_get_pages(struct address_space *mapping, pgoff_t start,
360 unsigned find_get_pages_contig(struct address_space *mapping, pgoff_t start,
362 unsigned find_get_pages_tag(struct address_space *mapping, pgoff_t *index,
365 struct page *grab_cache_page_write_begin(struct address_space *mapping,
371 static inline struct page *grab_cache_page(struct address_space *mapping, in grab_cache_page() argument
374 return find_or_create_page(mapping, index, mapping_gfp_mask(mapping)); in grab_cache_page()
377 extern struct page * read_cache_page(struct address_space *mapping,
379 extern struct page * read_cache_page_gfp(struct address_space *mapping,
381 extern int read_cache_pages(struct address_space *mapping,
384 static inline struct page *read_mapping_page(struct address_space *mapping, in read_mapping_page() argument
387 filler_t *filler = (filler_t *)mapping->a_ops->readpage; in read_mapping_page()
388 return read_cache_page(mapping, index, filler, data); in read_mapping_page()
656 int add_to_page_cache_locked(struct page *page, struct address_space *mapping,
658 int add_to_page_cache_lru(struct page *page, struct address_space *mapping,
670 struct address_space *mapping, pgoff_t offset, gfp_t gfp_mask) in add_to_page_cache() argument
675 error = add_to_page_cache_locked(page, mapping, offset, gfp_mask); in add_to_page_cache()