kernels/linux-2.4.0/fs/minix/inode.c
/*
 * the global minix fs getblk function.
 */
the global minix fs getblk function.
the global minix fs getblk function .
struct buffer_head *minix_getblk(struct inode *inode, int block, int create)
{
	struct buffer_head dummy;
	int error;
	dummy.b_state = 0;
	dummy.b_blocknr = -1000;
	error = minix_get_block(inode, block, &dummy, create);
	if (!error && buffer_mapped(&dummy)) {
		struct buffer_head *bh;
		bh = getblk(dummy.b_dev, dummy.b_blocknr, BLOCK_SIZE);
		if (buffer_new(&dummy)) {
			memset(bh->b_data, 0, BLOCK_SIZE);
			mark_buffer_uptodate(bh, 1);
			mark_buffer_dirty(bh);
		}
		return bh;
	}
	return NULL;
}
struct buffer_head * minix_getblk ( struct inode * inode , int block , int create ) { struct buffer_head dummy ; int error ; dummy . b_state = 0 ; dummy . b_blocknr = -1000 ; error = minix_get_block ( inode , block , & dummy , create ) ; if ( ! error && buffer_mapped ( & dummy ) ) { struct buffer_head * bh ; bh = getblk ( dummy . b_dev , dummy . b_blocknr , BLOCK_SIZE ) ; if ( buffer_new ( & dummy ) ) { memset ( bh -> b_data , 0 , BLOCK_SIZE ) ; mark_buffer_uptodate ( bh , 1 ) ; mark_buffer_dirty ( bh ) ; } return bh ; } return NULL ; }
the global minix fs getblk function.
the global minix fs getblk function .