aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/aops.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-14 15:29:08 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-14 15:29:08 -0700
commit4e337adae4e960f64043b9f433c4a825c902616c (patch)
tree407ea9edaec1ec666e5a0a6368dc51be2bc913c9 /fs/ocfs2/aops.c
parent0bdd0f385a44344f83409b9e00797bfe2596faf8 (diff)
parentb36c3f84988eebf38acaccc756e05f6b70e333ab (diff)
downloadkernel_samsung_tuna-4e337adae4e960f64043b9f433c4a825c902616c.zip
kernel_samsung_tuna-4e337adae4e960f64043b9f433c4a825c902616c.tar.gz
kernel_samsung_tuna-4e337adae4e960f64043b9f433c4a825c902616c.tar.bz2
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/mfasheh/ocfs2
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/mfasheh/ocfs2: ocfs2_dlm: Add missing locks in dlm_empty_lockres ocfs2_dlm: Missing get/put lockres in dlm_run_purge_lockres configfs: add missing mutex_unlock() ocfs2: add some missing address space callbacks ocfs2: Concurrent access of o2hb_region->hr_task was not locked ocfs2: Proper cleanup in case of error in ocfs2_register_hb_callbacks()
Diffstat (limited to 'fs/ocfs2/aops.c')
-rw-r--r--fs/ocfs2/aops.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
index 93628b0..875c114 100644
--- a/fs/ocfs2/aops.c
+++ b/fs/ocfs2/aops.c
@@ -614,6 +614,27 @@ static void ocfs2_dio_end_io(struct kiocb *iocb,
ocfs2_rw_unlock(inode, 0);
}
+/*
+ * ocfs2_invalidatepage() and ocfs2_releasepage() are shamelessly stolen
+ * from ext3. PageChecked() bits have been removed as OCFS2 does not
+ * do journalled data.
+ */
+static void ocfs2_invalidatepage(struct page *page, unsigned long offset)
+{
+ journal_t *journal = OCFS2_SB(page->mapping->host->i_sb)->journal->j_journal;
+
+ journal_invalidatepage(journal, page, offset);
+}
+
+static int ocfs2_releasepage(struct page *page, gfp_t wait)
+{
+ journal_t *journal = OCFS2_SB(page->mapping->host->i_sb)->journal->j_journal;
+
+ if (!page_has_buffers(page))
+ return 0;
+ return journal_try_to_free_buffers(journal, page, wait);
+}
+
static ssize_t ocfs2_direct_IO(int rw,
struct kiocb *iocb,
const struct iovec *iov,
@@ -661,5 +682,8 @@ const struct address_space_operations ocfs2_aops = {
.commit_write = ocfs2_commit_write,
.bmap = ocfs2_bmap,
.sync_page = block_sync_page,
- .direct_IO = ocfs2_direct_IO
+ .direct_IO = ocfs2_direct_IO,
+ .invalidatepage = ocfs2_invalidatepage,
+ .releasepage = ocfs2_releasepage,
+ .migratepage = buffer_migrate_page,
};