aboutsummaryrefslogtreecommitdiffstats
path: root/fs/logfs
diff options
context:
space:
mode:
authorJoern Engel <joern@logfs.org>2010-05-01 11:33:06 -0400
committerJoern Engel <joern@logfs.org>2010-05-01 12:02:30 -0400
commitbd2b3f29594c50d7c5bd864d9af05d440394ee82 (patch)
tree1e8e49fe9d346d7ca869dc6e5954195be0e94123 /fs/logfs
parentad342631f13d40aa787b9e5aaf4800f10d6c3647 (diff)
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>
Diffstat (limited to 'fs/logfs')
-rw-r--r--fs/logfs/readwrite.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/logfs/readwrite.c b/fs/logfs/readwrite.c
index 8c663a55b726..e37cee3b1007 100644
--- a/fs/logfs/readwrite.c
+++ b/fs/logfs/readwrite.c
@@ -892,6 +892,8 @@ u64 logfs_seek_hole(struct inode *inode, u64 bix)
892 return bix; 892 return bix;
893 else if (li->li_data[INDIRECT_INDEX] & LOGFS_FULLY_POPULATED) 893 else if (li->li_data[INDIRECT_INDEX] & LOGFS_FULLY_POPULATED)
894 bix = maxbix(li->li_height); 894 bix = maxbix(li->li_height);
895 else if (bix >= maxbix(li->li_height))
896 return bix;
895 else { 897 else {
896 bix = seek_holedata_loop(inode, bix, 0); 898 bix = seek_holedata_loop(inode, bix, 0);
897 if (bix < maxbix(li->li_height)) 899 if (bix < maxbix(li->li_height))