Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 253915
b: refs/heads/master
c: c03f8aa
h: refs/heads/master
i:
  253913: 5f80fbc
  253911: 02d9bd9
v: v3
  • Loading branch information
Lukas Czerner authored and Theodore Ts'o committed Jun 6, 2011
1 parent 7d2f0e8 commit 4432ef2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 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: f17722f917b2f21497deb6edc62fb1683daa08e6
refs/heads/master: c03f8aa9abdd517477c2021ea1251939b4da49e6
2 changes: 1 addition & 1 deletion trunk/fs/ext4/ext4_extents.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ struct ext4_ext_path {
* positive retcode - signal for ext4_ext_walk_space(), see below
* callback must return valid extent (passed or newly created)
*/
typedef int (*ext_prepare_callback)(struct inode *, struct ext4_ext_path *,
typedef int (*ext_prepare_callback)(struct inode *, ext4_lblk_t,
struct ext4_ext_cache *,
struct ext4_extent *, void *);

Expand Down
8 changes: 3 additions & 5 deletions trunk/fs/ext4/extents.c
Original file line number Diff line number Diff line change
Expand Up @@ -1958,7 +1958,7 @@ static int ext4_ext_walk_space(struct inode *inode, ext4_lblk_t block,
err = -EIO;
break;
}
err = func(inode, path, &cbex, ex, cbdata);
err = func(inode, next, &cbex, ex, cbdata);
ext4_ext_drop_refs(path);

if (err < 0)
Expand Down Expand Up @@ -3914,14 +3914,13 @@ int ext4_convert_unwritten_extents(struct inode *inode, loff_t offset,
/*
* Callback function called for each extent to gather FIEMAP information.
*/
static int ext4_ext_fiemap_cb(struct inode *inode, struct ext4_ext_path *path,
static int ext4_ext_fiemap_cb(struct inode *inode, ext4_lblk_t next,
struct ext4_ext_cache *newex, struct ext4_extent *ex,
void *data)
{
__u64 logical;
__u64 physical;
__u64 length;
loff_t size;
__u32 flags = 0;
int ret = 0;
struct fiemap_extent_info *fieinfo = data;
Expand Down Expand Up @@ -4103,8 +4102,7 @@ static int ext4_ext_fiemap_cb(struct inode *inode, struct ext4_ext_path *path,
if (ex && ext4_ext_is_uninitialized(ex))
flags |= FIEMAP_EXTENT_UNWRITTEN;

size = i_size_read(inode);
if (logical + length >= size)
if (next == EXT_MAX_BLOCKS)
flags |= FIEMAP_EXTENT_LAST;

ret = fiemap_fill_next_extent(fieinfo, logical, physical,
Expand Down

0 comments on commit 4432ef2

Please sign in to comment.