Commit 0163916f authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://git.open-osd.org/linux-open-osd

* 'for-linus' of git://git.open-osd.org/linux-open-osd:
  exofs: confusion between kmap() and kmap_atomic() api
  exofs: Add default address_space_operations
parents a69eee49 ddf08f4b
...@@ -608,7 +608,7 @@ int exofs_make_empty(struct inode *inode, struct inode *parent) ...@@ -608,7 +608,7 @@ int exofs_make_empty(struct inode *inode, struct inode *parent)
de->inode_no = cpu_to_le64(parent->i_ino); de->inode_no = cpu_to_le64(parent->i_ino);
memcpy(de->name, PARENT_DIR, sizeof(PARENT_DIR)); memcpy(de->name, PARENT_DIR, sizeof(PARENT_DIR));
exofs_set_de_type(de, inode); exofs_set_de_type(de, inode);
kunmap_atomic(page, KM_USER0); kunmap_atomic(kaddr, KM_USER0);
err = exofs_commit_chunk(page, 0, chunk_size); err = exofs_commit_chunk(page, 0, chunk_size);
fail: fail:
page_cache_release(page); page_cache_release(page);
......
...@@ -755,6 +755,21 @@ static int exofs_write_end(struct file *file, struct address_space *mapping, ...@@ -755,6 +755,21 @@ static int exofs_write_end(struct file *file, struct address_space *mapping,
return ret; return ret;
} }
static int exofs_releasepage(struct page *page, gfp_t gfp)
{
EXOFS_DBGMSG("page 0x%lx\n", page->index);
WARN_ON(1);
return try_to_free_buffers(page);
}
static void exofs_invalidatepage(struct page *page, unsigned long offset)
{
EXOFS_DBGMSG("page_has_buffers=>%d\n", page_has_buffers(page));
WARN_ON(1);
block_invalidatepage(page, offset);
}
const struct address_space_operations exofs_aops = { const struct address_space_operations exofs_aops = {
.readpage = exofs_readpage, .readpage = exofs_readpage,
.readpages = exofs_readpages, .readpages = exofs_readpages,
...@@ -762,6 +777,21 @@ const struct address_space_operations exofs_aops = { ...@@ -762,6 +777,21 @@ const struct address_space_operations exofs_aops = {
.writepages = exofs_writepages, .writepages = exofs_writepages,
.write_begin = exofs_write_begin_export, .write_begin = exofs_write_begin_export,
.write_end = exofs_write_end, .write_end = exofs_write_end,
.releasepage = exofs_releasepage,
.set_page_dirty = __set_page_dirty_nobuffers,
.invalidatepage = exofs_invalidatepage,
/* Not implemented Yet */
.bmap = NULL, /* TODO: use osd's OSD_ACT_READ_MAP */
.direct_IO = NULL, /* TODO: Should be trivial to do */
/* With these NULL has special meaning or default is not exported */
.sync_page = NULL,
.get_xip_mem = NULL,
.migratepage = NULL,
.launder_page = NULL,
.is_partially_uptodate = NULL,
.error_remove_page = NULL,
}; };
/****************************************************************************** /******************************************************************************
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment