diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2011-02-14 11:08:53 -0700 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2011-02-14 11:08:53 -0700 |
commit | b214b7bbffca8ac6a6f1dad46408f7a9d4219098 (patch) | |
tree | 2ef03e062e2a04ea9f2d5439b0daea5274a1bc98 /fs/ioctl.c | |
parent | 7d48ec3698e7b747efa744fd340b0f2d1dbfd3e0 (diff) | |
parent | 100b33c8bd8a3235fd0b7948338d6cbb3db3c63d (diff) | |
download | talos-obmc-linux-b214b7bbffca8ac6a6f1dad46408f7a9d4219098.tar.gz talos-obmc-linux-b214b7bbffca8ac6a6f1dad46408f7a9d4219098.zip |
Merge commit 'v2.6.38-rc4' into spi/next
Diffstat (limited to 'fs/ioctl.c')
-rw-r--r-- | fs/ioctl.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/ioctl.c b/fs/ioctl.c index a59635e295fa..1eebeb72b202 100644 --- a/fs/ioctl.c +++ b/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); |