/*
 * Copyright (c) 2013
 * Phillip Lougher <phillip@squashfs.org.uk>
 *
 * This work is licensed under the terms of the GNU GPL, version 2. See
 * the COPYING file in the top-level directory.
 */

#include <linux/fs.h>
#include <linux/vfs.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/pagemap.h>
#include <linux/mutex.h>

#include "squashfs_fs.h"
#include "squashfs_fs_sb.h"
#include "squashfs_fs_i.h"
#include "squashfs.h"

/* Read separately compressed datablock and memcopy into page cache */
int squashfs_readpage_block(struct page *page, u64 block, int bsize)
{
	struct inode *i = page->mapping->host;
	struct squashfs_cache_entry *buffer = squashfs_get_datablock(i->i_sb,
		block, bsize);
	int res = buffer->error;

	if (res)
		ERROR("Unable to read page, block %llx, size %x\n", block,
			bsize);
	else
		squashfs_copy_cache(page, buffer, buffer->length, 0);

	squashfs_cache_put(buffer);
	return res;
}
nput type='hidden' name='showmsg' value='1'/><select name='h' onchange='this.form.submit();'>
<option value='emaclite-cleanup'>emaclite-cleanup</option>
<option value='master'>master</option>
<option value='nds-private-remove' selected='selected'>nds-private-remove</option>
<option value='packet-loop-back'>packet-loop-back</option>
<option value='packet-rx-pump-back'>packet-rx-pump-back</option>
</select> <input type='submit' value='switch'/></form></td></tr>
<tr><td class='sub'>net-next plumbings</td><td class='sub right'>Tobias Klauser</td></tr></table>
<table class='tabs'><tr><td>
<a href='/cgit.cgi/linux/net-next.git/?h=nds-private-remove'>summary</a><a href='/cgit.cgi/linux/net-next.git/refs/?h=nds-private-remove&amp;id=3898fac1f488c76e0eef5b5267b4ba8112a82ac4'>refs</a><a class='active' href='/cgit.cgi/linux/net-next.git/log/tools/arch?h=nds-private-remove&amp;showmsg=1'>log</a><a href='/cgit.cgi/linux/net-next.git/tree/tools/arch?h=nds-private-remove&amp;id=3898fac1f488c76e0eef5b5267b4ba8112a82ac4'>tree</a><a href='/cgit.cgi/linux/net-next.git/commit/tools/arch?h=nds-private-remove&amp;id=3898fac1f488c76e0eef5b5267b4ba8112a82ac4'>commit</a><a href='/cgit.cgi/linux/net-next.git/diff/tools/arch?h=nds-private-remove&amp;id=3898fac1f488c76e0eef5b5267b4ba8112a82ac4'>diff</a></td><td class='form'><form class='right' method='get' action='/cgit.cgi/linux/net-next.git/log/tools/arch'>
<input type='hidden' name='h' value='nds-private-remove'/><input type='hidden' name='id' value='3898fac1f488c76e0eef5b5267b4ba8112a82ac4'/><input type='hidden' name='showmsg' value='1'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/cgit.cgi/linux/net-next.git/log/?h=nds-private-remove&amp;id=3898fac1f488c76e0eef5b5267b4ba8112a82ac4&amp;showmsg=1'>root</a>/<a href='/cgit.cgi/linux/net-next.git/log/tools?h=nds-private-remove&amp;id=3898fac1f488c76e0eef5b5267b4ba8112a82ac4&amp;showmsg=1'>tools</a>/<a href='/cgit.cgi/linux/net-next.git/log/tools/arch?h=nds-private-remove&amp;id=3898fac1f488c76e0eef5b5267b4ba8112a82ac4&amp;showmsg=1'>arch</a></div><div class='content'><table class='list nowrap'><tr class='nohover'><th class='left'>Age</th><th class='left'>Commit message (<a href='/cgit.cgi/linux/net-next.git/log/tools/arch?h=nds-private-remove&amp;id=3898fac1f488c76e0eef5b5267b4ba8112a82ac4'>Collapse</a>)</th><th class='left'>Author</th><th class='left'>Files</th><th class='left'>Lines</th></tr>
th class='left'>Files</th><th class='left'>Lines</th></tr>