diff options
author | Nick Piggin <npiggin@suse.de> | 2010-05-27 08:42:19 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-05-27 22:15:47 -0400 |
commit | 3322e79a3860fd0d50e3c1879b2e98ac582c0ff6 (patch) | |
tree | 58ebfb1742c996dd9a40593c33c9ea1ff958efe8 /fs/block_dev.c | |
parent | 15c6fd9786dfaab43547bf60df6fa63170fb64fc (diff) |
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>
Diffstat (limited to 'fs/block_dev.c')
-rw-r--r-- | fs/block_dev.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c index d0b37e626a1a..7346c96308a5 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c | |||
@@ -172,8 +172,9 @@ blkdev_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov, | |||
172 | struct file *file = iocb->ki_filp; | 172 | struct file *file = iocb->ki_filp; |
173 | struct inode *inode = file->f_mapping->host; | 173 | struct inode *inode = file->f_mapping->host; |
174 | 174 | ||
175 | return blockdev_direct_IO_no_locking(rw, iocb, inode, I_BDEV(inode), | 175 | return blockdev_direct_IO_no_locking_newtrunc(rw, iocb, inode, |
176 | iov, offset, nr_segs, blkdev_get_blocks, NULL); | 176 | I_BDEV(inode), iov, offset, nr_segs, |
177 | blkdev_get_blocks, NULL); | ||
177 | } | 178 | } |
178 | 179 | ||
179 | int __sync_blockdev(struct block_device *bdev, int wait) | 180 | 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, | |||
309 | struct page **pagep, void **fsdata) | 310 | struct page **pagep, void **fsdata) |
310 | { | 311 | { |
311 | *pagep = NULL; | 312 | *pagep = NULL; |
312 | return block_write_begin(file, mapping, pos, len, flags, pagep, fsdata, | 313 | return block_write_begin_newtrunc(file, mapping, pos, len, flags, |
313 | blkdev_get_block); | 314 | pagep, fsdata, blkdev_get_block); |
314 | } | 315 | } |
315 | 316 | ||
316 | static int blkdev_write_end(struct file *file, struct address_space *mapping, | 317 | static int blkdev_write_end(struct file *file, struct address_space *mapping, |