1 dax: dax_layout_busy_page() warn on !exceptional
3 From: Ross Zwisler <ross.zwisler@linux.intel.com>
5 Inodes using DAX should only ever have exceptional entries in their page
6 caches. Make this clear by warning if the iteration in
7 dax_layout_busy_page() ever sees a non-exceptional entry, and by adding a
8 comment for the pagevec_release() call which only deals with struct page
11 Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
12 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
13 Reviewed-by: Jan Kara <jack@suse.cz>
15 fs/dax.c | 10 +++++++++-
16 1 file changed, 9 insertions(+), 1 deletion(-)
18 diff --git a/fs/dax.c b/fs/dax.c
19 index 641192808bb6..897b51e41d8f 100644
22 @@ -566,7 +566,8 @@ struct page *dax_layout_busy_page(struct address_space *mapping)
26 - if (!radix_tree_exceptional_entry(pvec_ent))
28 + !radix_tree_exceptional_entry(pvec_ent)))
31 xa_lock_irq(&mapping->i_pages);
32 @@ -578,6 +579,13 @@ struct page *dax_layout_busy_page(struct address_space *mapping)
38 + * We don't expect normal struct page entries to exist in our
39 + * tree, but we keep these pagevec calls so that this code is
40 + * consistent with the common pattern for handling pagevecs
41 + * throughout the kernel.
43 pagevec_remove_exceptionals(&pvec);
44 pagevec_release(&pvec);