Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 168851
b: refs/heads/master
c: 199bc9f
h: refs/heads/master
i:
  168849: a9c9da4
  168847: 81e54cb
v: v3
  • Loading branch information
David Woodhouse authored and Linus Torvalds committed Nov 30, 2009
1 parent 7147161 commit 6aaf159
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 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: c69f677cc852f3f7b2342ab2f1598670a463d576
refs/heads/master: 199bc9ff5ca5e4b3bcaff8927b2983c65f34c263
9 changes: 6 additions & 3 deletions trunk/fs/jffs2/read.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,15 @@ int jffs2_read_inode_range(struct jffs2_sb_info *c, struct jffs2_inode_info *f,

/* XXX FIXME: Where a single physical node actually shows up in two
frags, we read it twice. Don't do that. */
/* Now we're pointing at the first frag which overlaps our page */
/* Now we're pointing at the first frag which overlaps our page
* (or perhaps is before it, if we've been asked to read off the
* end of the file). */
while(offset < end) {
D2(printk(KERN_DEBUG "jffs2_read_inode_range: offset %d, end %d\n", offset, end));
if (unlikely(!frag || frag->ofs > offset)) {
if (unlikely(!frag || frag->ofs > offset ||
frag->ofs + frag->size <= offset)) {
uint32_t holesize = end - offset;
if (frag) {
if (frag && frag->ofs > offset) {
D1(printk(KERN_NOTICE "Eep. Hole in ino #%u fraglist. frag->ofs = 0x%08x, offset = 0x%08x\n", f->inocache->ino, frag->ofs, offset));
holesize = min(holesize, frag->ofs - offset);
}
Expand Down

0 comments on commit 6aaf159

Please sign in to comment.