fs: convert simple fs to new truncate
Convert simple filesystems: ramfs, configfs, sysfs, block_dev to new truncate sequence. Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Nick Piggin <npiggin@suse.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -172,8 +172,9 @@ blkdev_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov,
|
||||
struct file *file = iocb->ki_filp;
|
||||
struct inode *inode = file->f_mapping->host;
|
||||
|
||||
return blockdev_direct_IO_no_locking(rw, iocb, inode, I_BDEV(inode),
|
||||
iov, offset, nr_segs, blkdev_get_blocks, NULL);
|
||||
return blockdev_direct_IO_no_locking_newtrunc(rw, iocb, inode,
|
||||
I_BDEV(inode), iov, offset, nr_segs,
|
||||
blkdev_get_blocks, NULL);
|
||||
}
|
||||
|
||||
int __sync_blockdev(struct block_device *bdev, int wait)
|
||||
@@ -309,8 +310,8 @@ static int blkdev_write_begin(struct file *file, struct address_space *mapping,
|
||||
struct page **pagep, void **fsdata)
|
||||
{
|
||||
*pagep = NULL;
|
||||
return block_write_begin(file, mapping, pos, len, flags, pagep, fsdata,
|
||||
blkdev_get_block);
|
||||
return block_write_begin_newtrunc(file, mapping, pos, len, flags,
|
||||
pagep, fsdata, blkdev_get_block);
|
||||
}
|
||||
|
||||
static int blkdev_write_end(struct file *file, struct address_space *mapping,
|
||||
|
Reference in New Issue
Block a user