Re: [PATCH] ext4:Make FIEMAP and delayed allocation play well together.

Andreas Dilger
2011-02-27T06:57:57Z

On 2011-02-26, at 8:05 AM, Yongqiang Yang wrote:
> Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>

You can also add Reviewed-by: Andreas Dilger <adilger@dilger.ca>

> @@ -3782,38 +3783,162 @@ static int ext4_ext_fiemap_cb(struct inode *inode, struct ext4_ext_path *path,
> struct ext4_ext_cache *newex, struct ext4_extent *ex,
> void *data)
> {
> if (newex->ec_start == 0) {
> + pages = kmalloc(PAGE_SIZE, GFP_KERNEL);
> + if (pages == NULL)
> + return -EFAULT;

This should be -ENOMEM.

Cheers, Andreas