@@ -161,8 +161,12 @@ prototypes:
161161 int (*set_page_dirty)(struct page *page);
162162 int (*readpages)(struct file *filp, struct address_space *mapping,
163163 struct list_head *pages, unsigned nr_pages);
164- int (*prepare_write)(struct file *, struct page *, unsigned, unsigned);
165- int (*commit_write)(struct file *, struct page *, unsigned, unsigned);
164+ int (*write_begin)(struct file *, struct address_space *mapping,
165+ loff_t pos, unsigned len, unsigned flags,
166+ struct page **pagep, void **fsdata);
167+ int (*write_end)(struct file *, struct address_space *mapping,
168+ loff_t pos, unsigned len, unsigned copied,
169+ struct page *page, void *fsdata);
166170 sector_t (*bmap)(struct address_space *, sector_t);
167171 int (*invalidatepage) (struct page *, unsigned long);
168172 int (*releasepage) (struct page *, int);
@@ -180,8 +184,6 @@ sync_page: no maybe
180184writepages: no
181185set_page_dirty no no
182186readpages: no
183- prepare_write: no yes yes
184- commit_write: no yes yes
185187write_begin: no locks the page yes
186188write_end: no yes, unlocks yes
187189perform_write: no n/a yes
@@ -191,7 +193,7 @@ releasepage: no yes
191193direct_IO: no
192194launder_page: no yes
193195
194- ->prepare_write (), ->commit_write (), ->sync_page() and ->readpage()
196+ ->write_begin (), ->write_end (), ->sync_page() and ->readpage()
195197may be called from the request handler (/dev/loop).
196198
197199 ->readpage() unlocks the page, either synchronously or via I/O
0 commit comments