inode.c (a6cbcd4a4a85e2fdb0b3344b88df2e8b3d526b9e) inode.c (31b140398ce56ab41646eda7f02bcb78d6a4c916)
1/*
2 * inode.c - NILFS inode operations.
3 *
4 * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or

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

306 struct inode *inode = file->f_mapping->host;
307 size_t count = iov_iter_count(iter);
308 ssize_t size;
309
310 if (rw == WRITE)
311 return 0;
312
313 /* Needs synchronization with the cleaner */
1/*
2 * inode.c - NILFS inode operations.
3 *
4 * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or

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

306 struct inode *inode = file->f_mapping->host;
307 size_t count = iov_iter_count(iter);
308 ssize_t size;
309
310 if (rw == WRITE)
311 return 0;
312
313 /* Needs synchronization with the cleaner */
314 size = blockdev_direct_IO(rw, iocb, inode, iter->iov, offset,
315 iter->nr_segs, nilfs_get_block);
314 size = blockdev_direct_IO(rw, iocb, inode, iter, offset,
315 nilfs_get_block);
316
317 /*
318 * In case of error extending write may have instantiated a few
319 * blocks outside i_size. Trim these off again.
320 */
321 if (unlikely((rw & WRITE) && size < 0)) {
322 loff_t isize = i_size_read(inode);
323 loff_t end = offset + count;

--- 791 unchanged lines hidden ---
316
317 /*
318 * In case of error extending write may have instantiated a few
319 * blocks outside i_size. Trim these off again.
320 */
321 if (unlikely((rw & WRITE) && size < 0)) {
322 loff_t isize = i_size_read(inode);
323 loff_t end = offset + count;

--- 791 unchanged lines hidden ---