Lines Matching refs:mapping
48 static inline void mapping_set_error(struct address_space *mapping, int error) in mapping_set_error() argument
54 filemap_set_wb_err(mapping, error); in mapping_set_error()
58 set_bit(AS_ENOSPC, &mapping->flags); in mapping_set_error()
60 set_bit(AS_EIO, &mapping->flags); in mapping_set_error()
63 static inline void mapping_set_unevictable(struct address_space *mapping) in mapping_set_unevictable() argument
65 set_bit(AS_UNEVICTABLE, &mapping->flags); in mapping_set_unevictable()
68 static inline void mapping_clear_unevictable(struct address_space *mapping) in mapping_clear_unevictable() argument
70 clear_bit(AS_UNEVICTABLE, &mapping->flags); in mapping_clear_unevictable()
73 static inline int mapping_unevictable(struct address_space *mapping) in mapping_unevictable() argument
75 if (mapping) in mapping_unevictable()
76 return test_bit(AS_UNEVICTABLE, &mapping->flags); in mapping_unevictable()
77 return !!mapping; in mapping_unevictable()
80 static inline void mapping_set_exiting(struct address_space *mapping) in mapping_set_exiting() argument
82 set_bit(AS_EXITING, &mapping->flags); in mapping_set_exiting()
85 static inline int mapping_exiting(struct address_space *mapping) in mapping_exiting() argument
87 return test_bit(AS_EXITING, &mapping->flags); in mapping_exiting()
90 static inline void mapping_set_no_writeback_tags(struct address_space *mapping) in mapping_set_no_writeback_tags() argument
92 set_bit(AS_NO_WRITEBACK_TAGS, &mapping->flags); in mapping_set_no_writeback_tags()
95 static inline int mapping_use_writeback_tags(struct address_space *mapping) in mapping_use_writeback_tags() argument
97 return !test_bit(AS_NO_WRITEBACK_TAGS, &mapping->flags); in mapping_use_writeback_tags()
100 static inline gfp_t mapping_gfp_mask(struct address_space * mapping) in mapping_gfp_mask() argument
102 return mapping->gfp_mask; in mapping_gfp_mask()
106 static inline gfp_t mapping_gfp_constraint(struct address_space *mapping, in mapping_gfp_constraint() argument
109 return mapping_gfp_mask(mapping) & gfp_mask; in mapping_gfp_constraint()
244 pgoff_t page_cache_next_hole(struct address_space *mapping,
246 pgoff_t page_cache_prev_hole(struct address_space *mapping,
256 struct page *pagecache_get_page(struct address_space *mapping, pgoff_t offset,
269 static inline struct page *find_get_page(struct address_space *mapping, in find_get_page() argument
272 return pagecache_get_page(mapping, offset, 0, 0); in find_get_page()
275 static inline struct page *find_get_page_flags(struct address_space *mapping, in find_get_page_flags() argument
278 return pagecache_get_page(mapping, offset, fgp_flags, 0); in find_get_page_flags()
294 static inline struct page *find_lock_page(struct address_space *mapping, in find_lock_page() argument
297 return pagecache_get_page(mapping, offset, FGP_LOCK, 0); in find_lock_page()
319 static inline struct page *find_or_create_page(struct address_space *mapping, in find_or_create_page() argument
322 return pagecache_get_page(mapping, offset, in find_or_create_page()
340 static inline struct page *grab_cache_page_nowait(struct address_space *mapping, in grab_cache_page_nowait() argument
343 return pagecache_get_page(mapping, index, in grab_cache_page_nowait()
345 mapping_gfp_mask(mapping)); in grab_cache_page_nowait()
348 struct page *find_get_entry(struct address_space *mapping, pgoff_t offset);
349 struct page *find_lock_entry(struct address_space *mapping, pgoff_t offset);
350 unsigned find_get_entries(struct address_space *mapping, pgoff_t start,
353 unsigned find_get_pages_range(struct address_space *mapping, pgoff_t *start,
356 static inline unsigned find_get_pages(struct address_space *mapping, in find_get_pages() argument
360 return find_get_pages_range(mapping, start, (pgoff_t)-1, nr_pages, in find_get_pages()
363 unsigned find_get_pages_contig(struct address_space *mapping, pgoff_t start,
365 unsigned find_get_pages_range_tag(struct address_space *mapping, pgoff_t *index,
368 static inline unsigned find_get_pages_tag(struct address_space *mapping, in find_get_pages_tag() argument
372 return find_get_pages_range_tag(mapping, index, (pgoff_t)-1, tag, in find_get_pages_tag()
375 unsigned find_get_entries_tag(struct address_space *mapping, pgoff_t start,
379 struct page *grab_cache_page_write_begin(struct address_space *mapping,
385 static inline struct page *grab_cache_page(struct address_space *mapping, in grab_cache_page() argument
388 return find_or_create_page(mapping, index, mapping_gfp_mask(mapping)); in grab_cache_page()
391 extern struct page * read_cache_page(struct address_space *mapping,
393 extern struct page * read_cache_page_gfp(struct address_space *mapping,
395 extern int read_cache_pages(struct address_space *mapping,
398 static inline struct page *read_mapping_page(struct address_space *mapping, in read_mapping_page() argument
401 filler_t *filler = (filler_t *)mapping->a_ops->readpage; in read_mapping_page()
402 return read_cache_page(mapping, index, filler, data); in read_mapping_page()
616 int add_to_page_cache_locked(struct page *page, struct address_space *mapping,
618 int add_to_page_cache_lru(struct page *page, struct address_space *mapping,
623 void delete_from_page_cache_batch(struct address_space *mapping,
631 struct address_space *mapping, pgoff_t offset, gfp_t gfp_mask) in add_to_page_cache() argument
636 error = add_to_page_cache_locked(page, mapping, offset, gfp_mask); in add_to_page_cache()