/*
 * file.c
 *
 * Copyright (c) 1999 Al Smith
 *
 * Portions derived from work (c) 1995,1996 Christian Vogelgsang.
 */

#include <linux/buffer_head.h>
#include "efs.h"

int efs_get_block(struct inode *inode, sector_t iblock,
		  struct buffer_head *bh_result, int create)
{
	int error = -EROFS;
	long phys;

	if (create)
		return error;
	if (iblock >= inode->i_blocks) {
#ifdef DEBUG
		/*
		 * i have no idea why this happens as often as it does
		 */
		pr_warn("%s(): block %d >= %ld (filesize %ld)\n",
			__func__, block, inode->i_blocks, inode->i_size);
#endif
		return 0;
	}
	phys = efs_map_block(inode, iblock);
	if (phys)
		map_bh(bh_result, inode->i_sb, phys);
	return 0;
}

int efs_bmap(struct inode *inode, efs_block_t block) {

	if (block < 0) {
		pr_warn("%s(): block < 0\n", __func__);
		return 0;
	}

	/* are we about to read past the end of a file ? */
	if (!(block < inode->i_blocks)) {
#ifdef DEBUG
		/*
		 * i have no idea why this happens as often as it does
		 */
		pr_warn("%s(): block %d >= %ld (filesize %ld)\n",
			__func__, block, inode->i_blocks, inode->i_size);
#endif
		return 0;
	}

	return efs_map_block(inode, block);
}
>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=013e8167899d389075160412a8c0c5e0581e1f13'>refs</a><a class='active' href='/cgit.cgi/linux/net-next.git/log/tools/perf/Documentation/asciidoc.conf?h=nds-private-remove'>log</a><a href='/cgit.cgi/linux/net-next.git/tree/tools/perf/Documentation/asciidoc.conf?h=nds-private-remove&amp;id=013e8167899d389075160412a8c0c5e0581e1f13'>tree</a><a href='/cgit.cgi/linux/net-next.git/commit/tools/perf/Documentation/asciidoc.conf?h=nds-private-remove&amp;id=013e8167899d389075160412a8c0c5e0581e1f13'>commit</a><a href='/cgit.cgi/linux/net-next.git/diff/tools/perf/Documentation/asciidoc.conf?h=nds-private-remove&amp;id=013e8167899d389075160412a8c0c5e0581e1f13'>diff</a></td><td class='form'><form class='right' method='get' action='/cgit.cgi/linux/net-next.git/log/tools/perf/Documentation/asciidoc.conf'>
<input type='hidden' name='h' value='nds-private-remove'/><input type='hidden' name='id' value='013e8167899d389075160412a8c0c5e0581e1f13'/><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=013e8167899d389075160412a8c0c5e0581e1f13'>root</a>/<a href='/cgit.cgi/linux/net-next.git/log/tools?h=nds-private-remove&amp;id=013e8167899d389075160412a8c0c5e0581e1f13'>tools</a>/<a href='/cgit.cgi/linux/net-next.git/log/tools/perf?h=nds-private-remove&amp;id=013e8167899d389075160412a8c0c5e0581e1f13'>perf</a>/<a href='/cgit.cgi/linux/net-next.git/log/tools/perf/Documentation?h=nds-private-remove&amp;id=013e8167899d389075160412a8c0c5e0581e1f13'>Documentation</a>/<a href='/cgit.cgi/linux/net-next.git/log/tools/perf/Documentation/asciidoc.conf?h=nds-private-remove&amp;id=013e8167899d389075160412a8c0c5e0581e1f13'>asciidoc.conf</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/perf/Documentation/asciidoc.conf?h=nds-private-remove&amp;id=013e8167899d389075160412a8c0c5e0581e1f13&amp;showmsg=1'>Expand</a>)</th><th class='left'>Author</th><th class='left'>Files</th><th class='left'>Lines</th></tr>