get rid of nobh_write_begin_newtrunc
Move the call to vmtruncate to get rid of accessive blocks to the only remaining caller and rename the non-truncating version to nobh_write_begin. Get rid of the superflous file argument to it while we're at it. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
eafdc7d190
commit
ea0f04e595
4 changed files with 17 additions and 46 deletions
|
@ -806,13 +806,8 @@ ext2_nobh_write_begin(struct file *file, struct address_space *mapping,
|
|||
{
|
||||
int ret;
|
||||
|
||||
/*
|
||||
* Dir-in-pagecache still uses ext2_write_begin. Would have to rework
|
||||
* directory handling code to pass around offsets rather than struct
|
||||
* pages in order to make this work easily.
|
||||
*/
|
||||
ret = nobh_write_begin_newtrunc(file, mapping, pos, len, flags, pagep,
|
||||
fsdata, ext2_get_block);
|
||||
ret = nobh_write_begin(mapping, pos, len, flags, pagep, fsdata,
|
||||
ext2_get_block);
|
||||
if (ret < 0)
|
||||
ext2_write_failed(mapping, pos + len);
|
||||
return ret;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue