Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 257377
b: refs/heads/master
c: f9b5570
h: refs/heads/master
i:
  257375: af62bae
v: v3
  • Loading branch information
Christoph Hellwig authored and Al Viro committed Jul 21, 2011
1 parent 4f01ba9 commit 849b4bb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 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: 9ea7df534ed2a18157434a496a12cf073ca00c52
refs/heads/master: f9b5570d7fdedff32a2e78102bfb54cd1b12b289
7 changes: 5 additions & 2 deletions trunk/fs/direct-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -1200,6 +1200,10 @@ __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode,
}
}

/* watch out for a 0 len io from a tricksy fs */
if (rw == READ && end == offset)
return 0;

dio = kmalloc(sizeof(*dio), GFP_KERNEL);
retval = -ENOMEM;
if (!dio)
Expand All @@ -1213,8 +1217,7 @@ __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode,

dio->flags = flags;
if (dio->flags & DIO_LOCKING) {
/* watch out for a 0 len io from a tricksy fs */
if (rw == READ && end > offset) {
if (rw == READ) {
struct address_space *mapping =
iocb->ki_filp->f_mapping;

Expand Down

0 comments on commit 849b4bb

Please sign in to comment.