logfs: fix logfs_seek_hole()
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>
This commit is contained in:
parent
ad342631f1
commit
bd2b3f2959
|
@ -892,6 +892,8 @@ u64 logfs_seek_hole(struct inode *inode, u64 bix)
|
||||||
return bix;
|
return bix;
|
||||||
else if (li->li_data[INDIRECT_INDEX] & LOGFS_FULLY_POPULATED)
|
else if (li->li_data[INDIRECT_INDEX] & LOGFS_FULLY_POPULATED)
|
||||||
bix = maxbix(li->li_height);
|
bix = maxbix(li->li_height);
|
||||||
|
else if (bix >= maxbix(li->li_height))
|
||||||
|
return bix;
|
||||||
else {
|
else {
|
||||||
bix = seek_holedata_loop(inode, bix, 0);
|
bix = seek_holedata_loop(inode, bix, 0);
|
||||||
if (bix < maxbix(li->li_height))
|
if (bix < maxbix(li->li_height))
|
||||||
|
|
Loading…
Reference in a new issue