tizen: Use unique directory prefix for baselibs packages
[platform/kernel/linux-rpi.git] / fs / dax.c
index 8fafecb..3380b43 100644 (file)
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -412,23 +412,23 @@ static struct page *dax_busy_page(void *entry)
        return NULL;
 }
 
-/*
- * dax_lock_page - Lock the DAX entry corresponding to a page
- * @page: The page whose entry we want to lock
+/**
+ * dax_lock_folio - Lock the DAX entry corresponding to a folio
+ * @folio: The folio whose entry we want to lock
  *
  * Context: Process context.
- * Return: A cookie to pass to dax_unlock_page() or 0 if the entry could
+ * Return: A cookie to pass to dax_unlock_folio() or 0 if the entry could
  * not be locked.
  */
-dax_entry_t dax_lock_page(struct page *page)
+dax_entry_t dax_lock_folio(struct folio *folio)
 {
        XA_STATE(xas, NULL, 0);
        void *entry;
 
-       /* Ensure page->mapping isn't freed while we look at it */
+       /* Ensure folio->mapping isn't freed while we look at it */
        rcu_read_lock();
        for (;;) {
-               struct address_space *mapping = READ_ONCE(page->mapping);
+               struct address_space *mapping = READ_ONCE(folio->mapping);
 
                entry = NULL;
                if (!mapping || !dax_mapping(mapping))
@@ -447,11 +447,11 @@ dax_entry_t dax_lock_page(struct page *page)
 
                xas.xa = &mapping->i_pages;
                xas_lock_irq(&xas);
-               if (mapping != page->mapping) {
+               if (mapping != folio->mapping) {
                        xas_unlock_irq(&xas);
                        continue;
                }
-               xas_set(&xas, page->index);
+               xas_set(&xas, folio->index);
                entry = xas_load(&xas);
                if (dax_is_locked(entry)) {
                        rcu_read_unlock();
@@ -467,10 +467,10 @@ dax_entry_t dax_lock_page(struct page *page)
        return (dax_entry_t)entry;
 }
 
-void dax_unlock_page(struct page *page, dax_entry_t cookie)
+void dax_unlock_folio(struct folio *folio, dax_entry_t cookie)
 {
-       struct address_space *mapping = page->mapping;
-       XA_STATE(xas, &mapping->i_pages, page->index);
+       struct address_space *mapping = folio->mapping;
+       XA_STATE(xas, &mapping->i_pages, folio->index);
 
        if (S_ISCHR(mapping->host->i_mode))
                return;