Commit 002cbb13 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Matthew Wilcox (Oracle)

jfs: stop using the nobh helper

The nobh mode is an obscure feature to save lowlevel for large memory
32-bit configurations while trading for much slower performance and
has been long obsolete.  Switch to the regular buffer head based helpers
instead.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
parent 0cc5b4ce
...@@ -301,13 +301,25 @@ static int jfs_write_begin(struct file *file, struct address_space *mapping, ...@@ -301,13 +301,25 @@ static int jfs_write_begin(struct file *file, struct address_space *mapping,
{ {
int ret; int ret;
ret = nobh_write_begin(mapping, pos, len, pagep, fsdata, jfs_get_block); ret = block_write_begin(mapping, pos, len, pagep, jfs_get_block);
if (unlikely(ret)) if (unlikely(ret))
jfs_write_failed(mapping, pos + len); jfs_write_failed(mapping, pos + len);
return ret; return ret;
} }
static int jfs_write_end(struct file *file, struct address_space *mapping,
loff_t pos, unsigned len, unsigned copied, struct page *page,
void *fsdata)
{
int ret;
ret = generic_write_end(file, mapping, pos, len, copied, page, fsdata);
if (ret < len)
jfs_write_failed(mapping, pos + len);
return ret;
}
static sector_t jfs_bmap(struct address_space *mapping, sector_t block) static sector_t jfs_bmap(struct address_space *mapping, sector_t block)
{ {
return generic_block_bmap(mapping, block, jfs_get_block); return generic_block_bmap(mapping, block, jfs_get_block);
...@@ -346,7 +358,7 @@ const struct address_space_operations jfs_aops = { ...@@ -346,7 +358,7 @@ const struct address_space_operations jfs_aops = {
.writepage = jfs_writepage, .writepage = jfs_writepage,
.writepages = jfs_writepages, .writepages = jfs_writepages,
.write_begin = jfs_write_begin, .write_begin = jfs_write_begin,
.write_end = nobh_write_end, .write_end = jfs_write_end,
.bmap = jfs_bmap, .bmap = jfs_bmap,
.direct_IO = jfs_direct_IO, .direct_IO = jfs_direct_IO,
}; };
...@@ -399,7 +411,7 @@ void jfs_truncate(struct inode *ip) ...@@ -399,7 +411,7 @@ void jfs_truncate(struct inode *ip)
{ {
jfs_info("jfs_truncate: size = 0x%lx", (ulong) ip->i_size); jfs_info("jfs_truncate: size = 0x%lx", (ulong) ip->i_size);
nobh_truncate_page(ip->i_mapping, ip->i_size, jfs_get_block); block_truncate_page(ip->i_mapping, ip->i_size, jfs_get_block);
IWRITE_LOCK(ip, RDWRLOCK_NORMAL); IWRITE_LOCK(ip, RDWRLOCK_NORMAL);
jfs_truncate_nolock(ip, ip->i_size); jfs_truncate_nolock(ip, ip->i_size);
......
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