inode.c (a6cbcd4a4a85e2fdb0b3344b88df2e8b3d526b9e) inode.c (31b140398ce56ab41646eda7f02bcb78d6a4c916)
1/*
2 * Copyright 2000 by Hans Reiser, licensing governed by reiserfs/README
3 */
4
5#include <linux/time.h>
6#include <linux/fs.h>
7#include "reiserfs.h"
8#include "acl.h"

--- 3076 unchanged lines hidden (view full) ---

3085static ssize_t reiserfs_direct_IO(int rw, struct kiocb *iocb,
3086 struct iov_iter *iter, loff_t offset)
3087{
3088 struct file *file = iocb->ki_filp;
3089 struct inode *inode = file->f_mapping->host;
3090 size_t count = iov_iter_count(iter);
3091 ssize_t ret;
3092
1/*
2 * Copyright 2000 by Hans Reiser, licensing governed by reiserfs/README
3 */
4
5#include <linux/time.h>
6#include <linux/fs.h>
7#include "reiserfs.h"
8#include "acl.h"

--- 3076 unchanged lines hidden (view full) ---

3085static ssize_t reiserfs_direct_IO(int rw, struct kiocb *iocb,
3086 struct iov_iter *iter, loff_t offset)
3087{
3088 struct file *file = iocb->ki_filp;
3089 struct inode *inode = file->f_mapping->host;
3090 size_t count = iov_iter_count(iter);
3091 ssize_t ret;
3092
3093 ret = blockdev_direct_IO(rw, iocb, inode, iter->iov, offset,
3094 iter->nr_segs, reiserfs_get_blocks_direct_io);
3093 ret = blockdev_direct_IO(rw, iocb, inode, iter, offset,
3094 reiserfs_get_blocks_direct_io);
3095
3096 /*
3097 * In case of error extending write may have instantiated a few
3098 * blocks outside i_size. Trim these off again.
3099 */
3100 if (unlikely((rw & WRITE) && ret < 0)) {
3101 loff_t isize = i_size_read(inode);
3102 loff_t end = offset + count;

--- 151 unchanged lines hidden ---
3095
3096 /*
3097 * In case of error extending write may have instantiated a few
3098 * blocks outside i_size. Trim these off again.
3099 */
3100 if (unlikely((rw & WRITE) && ret < 0)) {
3101 loff_t isize = i_size_read(inode);
3102 loff_t end = offset + count;

--- 151 unchanged lines hidden ---