do d_instantiate/unlock_new_inode combinations safely
[linux-2.6-microblaze.git] / fs / f2fs / node.c
index 9a99243..f202398 100644 (file)
@@ -91,11 +91,11 @@ static void clear_node_page_dirty(struct page *page)
        unsigned int long flags;
 
        if (PageDirty(page)) {
-               spin_lock_irqsave(&mapping->tree_lock, flags);
-               radix_tree_tag_clear(&mapping->page_tree,
+               xa_lock_irqsave(&mapping->i_pages, flags);
+               radix_tree_tag_clear(&mapping->i_pages,
                                page_index(page),
                                PAGECACHE_TAG_DIRTY);
-               spin_unlock_irqrestore(&mapping->tree_lock, flags);
+               xa_unlock_irqrestore(&mapping->i_pages, flags);
 
                clear_page_dirty_for_io(page);
                dec_page_count(F2FS_M_SB(mapping), F2FS_DIRTY_NODES);
@@ -1161,7 +1161,7 @@ void ra_node_page(struct f2fs_sb_info *sbi, nid_t nid)
        f2fs_bug_on(sbi, check_nid_range(sbi, nid));
 
        rcu_read_lock();
-       apage = radix_tree_lookup(&NODE_MAPPING(sbi)->page_tree, nid);
+       apage = radix_tree_lookup(&NODE_MAPPING(sbi)->i_pages, nid);
        rcu_read_unlock();
        if (apage)
                return;