Skip to content

Commit eedcbba

Browse files
Nick PigginLinus Torvalds
authored andcommitted
bfs: convert to new aops
Signed-off-by: Nick Piggin <npiggin@suse.de> Cc: Tigran Aivazian <tigran@aivazian.fsnet.co.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent d6091b7 commit eedcbba

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

‎fs/bfs/file.c‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,13 @@ static int bfs_readpage(struct file *file, struct page *page)
145145
return block_read_full_page(page, bfs_get_block);
146146
}
147147

148-
static int bfs_prepare_write(struct file *file, struct page *page, unsigned from, unsigned to)
148+
static int bfs_write_begin(struct file *file, struct address_space *mapping,
149+
loff_t pos, unsigned len, unsigned flags,
150+
struct page **pagep, void **fsdata)
149151
{
150-
return block_prepare_write(page, from, to, bfs_get_block);
152+
*pagep = NULL;
153+
return block_write_begin(file, mapping, pos, len, flags,
154+
pagep, fsdata, bfs_get_block);
151155
}
152156

153157
static sector_t bfs_bmap(struct address_space *mapping, sector_t block)
@@ -159,8 +163,8 @@ const struct address_space_operations bfs_aops = {
159163
.readpage = bfs_readpage,
160164
.writepage = bfs_writepage,
161165
.sync_page = block_sync_page,
162-
.prepare_write = bfs_prepare_write,
163-
.commit_write = generic_commit_write,
166+
.write_begin = bfs_write_begin,
167+
.write_end = generic_write_end,
164168
.bmap = bfs_bmap,
165169
};
166170

0 commit comments

Comments
 (0)