summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2015-06-21 01:37:24 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2015-06-23 18:01:07 -0400
commit6b6dabc8dcefaf9997ce037c70b32d570ced9d3e (patch)
tree24372b08d5f9f1b4b8da05eb3383786806419cc1 /fs
parent2726d56620ce71f40dd583d51391b86e1ab8cc57 (diff)
downloadop-kernel-dev-6b6dabc8dcefaf9997ce037c70b32d570ced9d3e.zip
op-kernel-dev-6b6dabc8dcefaf9997ce037c70b32d570ced9d3e.tar.gz
nilfs2_direct_IO(): remove dead code
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/nilfs2/inode.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c
index 258d9fe..4a73d6d 100644
--- a/fs/nilfs2/inode.c
+++ b/fs/nilfs2/inode.c
@@ -307,31 +307,13 @@ static int nilfs_write_end(struct file *file, struct address_space *mapping,
static ssize_t
nilfs_direct_IO(struct kiocb *iocb, struct iov_iter *iter, loff_t offset)
{
- struct file *file = iocb->ki_filp;
- struct address_space *mapping = file->f_mapping;
- struct inode *inode = file->f_mapping->host;
- size_t count = iov_iter_count(iter);
- ssize_t size;
+ struct inode *inode = file_inode(iocb->ki_filp);
if (iov_iter_rw(iter) == WRITE)
return 0;
/* Needs synchronization with the cleaner */
- size = blockdev_direct_IO(iocb, inode, iter, offset, nilfs_get_block);
-
- /*
- * In case of error extending write may have instantiated a few
- * blocks outside i_size. Trim these off again.
- */
- if (unlikely(iov_iter_rw(iter) == WRITE && size < 0)) {
- loff_t isize = i_size_read(inode);
- loff_t end = offset + count;
-
- if (end > isize)
- nilfs_write_failed(mapping, end);
- }
-
- return size;
+ return blockdev_direct_IO(iocb, inode, iter, offset, nilfs_get_block);
}
const struct address_space_operations nilfs_aops = {
OpenPOWER on IntegriCloud