Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 319829
b: refs/heads/master
c: 5276432
h: refs/heads/master
i:
  319827: 8b954fe
v: v3
  • Loading branch information
Dave Chinner authored and Ben Myers committed Jun 14, 2012
1 parent 6429fcd commit 7f8f5a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 32972383ca46223aa2b129826b3789721ec147aa
refs/heads/master: 5276432997feb2366ac1e77949e94fe86a394813
17 changes: 3 additions & 14 deletions trunk/fs/xfs/xfs_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ xfs_file_aio_read(
ssize_t ret = 0;
int ioflags = 0;
xfs_fsize_t n;
unsigned long seg;

XFS_STATS_INC(xs_read_calls);

Expand All @@ -247,19 +246,9 @@ xfs_file_aio_read(
if (file->f_mode & FMODE_NOCMTIME)
ioflags |= IO_INVIS;

/* START copy & waste from filemap.c */
for (seg = 0; seg < nr_segs; seg++) {
const struct iovec *iv = &iovp[seg];

/*
* If any segment has a negative length, or the cumulative
* length ever wraps negative then return -EINVAL.
*/
size += iv->iov_len;
if (unlikely((ssize_t)(size|iv->iov_len) < 0))
return XFS_ERROR(-EINVAL);
}
/* END copy & waste from filemap.c */
ret = generic_segment_checks(iovp, &nr_segs, &size, VERIFY_WRITE);
if (ret < 0)
return ret;

if (unlikely(ioflags & IO_ISDIRECT)) {
xfs_buftarg_t *target =
Expand Down

0 comments on commit 7f8f5a0

Please sign in to comment.