[patch 4/5] ext2: convert to new aops

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Nick Piggin
Date: Wednesday, March 14, 2007 - 6:38 am

Implement new aops for ext2.

 fs/ext2/inode.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)

Index: linux-2.6/fs/ext2/inode.c
===================================================================
--- linux-2.6.orig/fs/ext2/inode.c
+++ linux-2.6/fs/ext2/inode.c
@@ -643,6 +643,16 @@ ext2_readpages(struct file *file, struct
 }
 
 static int
+ext2_write_begin(struct file *file, struct address_space *mapping,
+		loff_t pos, unsigned len, int intr,
+		struct page **pagep, void **fsdata)
+{
+	*pagep = NULL;
+	return block_write_begin(file, mapping, pos, len, intr, pagep, fsdata,
+							ext2_get_block);
+}
+
+static int
 ext2_prepare_write(struct file *file, struct page *page,
 			unsigned from, unsigned to)
 {
@@ -689,6 +699,8 @@ const struct address_space_operations ex
 	.readpages		= ext2_readpages,
 	.writepage		= ext2_writepage,
 	.sync_page		= block_sync_page,
+	.write_begin		= ext2_write_begin,
+	.write_end		= block_write_end,
 	.prepare_write		= ext2_prepare_write,
 	.commit_write		= generic_commit_write,
 	.bmap			= ext2_bmap,
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 1/5] fs: add an iovec iterator, Nick Piggin, (Wed Mar 14, 6:38 am)
[patch 2/5] fs: introduce new aops and infrastructure, Nick Piggin, (Wed Mar 14, 6:38 am)
[patch 3/5] fs: convert some simple filesystems, Nick Piggin, (Wed Mar 14, 6:38 am)
[patch 4/5] ext2: convert to new aops, Nick Piggin, (Wed Mar 14, 6:38 am)
[patch 5/5] ext3: convert to new aops, Nick Piggin, (Wed Mar 14, 6:38 am)
Re: [patch 1/5] fs: add an iovec iterator, Nick Piggin, (Wed Mar 14, 6:51 am)
Re: [patch 2/5] fs: introduce new aops and infrastructure, Dmitriy Monakhov, (Wed Mar 14, 2:28 pm)
Re: [patch 2/5] fs: introduce new aops and infrastructure, Dmitriy Monakhov, (Thu Mar 15, 2:44 am)