diff --git a/[refs] b/[refs] index c5ba8d9b2a73..c42004794c85 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3cd90ea42f2c15f928b70ed66f6d8ed0a8e7aadd +refs/heads/master: d54cdc8ca7aabc69e145a62155855db42b04ed0b diff --git a/trunk/fs/ioctl.c b/trunk/fs/ioctl.c index a59635e295fa..1eebeb72b202 100644 --- a/trunk/fs/ioctl.c +++ b/trunk/fs/ioctl.c @@ -273,6 +273,13 @@ int __generic_block_fiemap(struct inode *inode, len = isize; } + /* + * Some filesystems can't deal with being asked to map less than + * blocksize, so make sure our len is at least block length. + */ + if (logical_to_blk(inode, len) == 0) + len = blk_to_logical(inode, 1); + start_blk = logical_to_blk(inode, start); last_blk = logical_to_blk(inode, start + len - 1);