Skip to content

Commit

Permalink
logfs: fix logfs_seek_hole()
Browse files Browse the repository at this point in the history
logfs_seek_hole(inode, 0x200) would crap itself if the inode contained
just 0x1ff (or fewer) blocks.

Signed-off-by: Joern Engel <joern@logfs.org>
  • Loading branch information
Joern Engel committed May 1, 2010
1 parent ad34263 commit bd2b3f2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/logfs/readwrite.c
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,8 @@ u64 logfs_seek_hole(struct inode *inode, u64 bix)
return bix;
else if (li->li_data[INDIRECT_INDEX] & LOGFS_FULLY_POPULATED)
bix = maxbix(li->li_height);
else if (bix >= maxbix(li->li_height))
return bix;
else {
bix = seek_holedata_loop(inode, bix, 0);
if (bix < maxbix(li->li_height))
Expand Down

0 comments on commit bd2b3f2

Please sign in to comment.