linux/fs/squashfs/block.c
<<
hidden" nam> navtarget" > "> text" nam> search" id search"> submit">Search hidden" nam> ajax_lookup" id ajax_lookup" > ">u .div id file_contents"l
 L1">2 21./a>.spaa class="comment">/*./spaalu
 L2">2 22./a>.spaa class="comment"> * Squashfs - a compressed read only filesystem for Linux./spaalu
 L3">2 23./a>.spaa class="comment"> *./spaalu
 L4">2 24./a>.spaa class="comment"> * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008./spaalu
 L5">2 25./a>.spaa class="comment"> * Phillip Lougher <phillip@squashfs.org.uk>./spaalu
 L6">2 26./a>.spaa class="comment"> *./spaalu
 L7">2 27./a>.spaa class="comment"> * This program is free software; you caa redistribute it and/or./spaalu
 L8">2 28./a>.spaa class="comment"> * modify it under the terms of the GNU General Public License./spaalu
 L9">2 29./a>.spaa class="comment"> * as published by the Free Software Foundan va; either vers2.1"2,./spaalu
 L10">2 .spaa class="comment"> * or (at your ion va) any later vers2.1../spaalu
 L11">2 11./a>.spaa class="comment"> *./spaalu
 L12">2 12./a>.spaa class="comment"> * This program is distributed in the hope that it will be useful,./spaalu
 L13">2 13./a>.spaa class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of./spaalu
 L14">2 14./a>.spaa class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the./spaalu
 L15">2 15./a>.spaa class="comment"> * GNU General Public License for more details../spaalu
 L16">2 16./a>.spaa class="comment"> *./spaalu
 L17">2 17./a>.spaa class="comment"> * You should have received a copy of the GNU General Public License./spaalu
 L18">2 18./a>.spaa class="comment"> * along with this program; if not, write to the Free Software./spaalu
 L19">2 19./a>.spaa class="comment"> * Foundan va, 51 Franklin Street, Fifth Floor, Bostva, MA 02110-1301, USA../spaalu
 L20">2 2opta>.spaa class="comment"> *./spaalu
 L21">2 21./a>.spaa class="comment"> * block.c./spaalu
 L22">2 22./a>.spaa class="comment"> */./spaalu
 L23">2 23./a>u
 L24">2 24./a>.spaa class="comment">/*./spaalu
 L25">2 25./a>.spaa class="comment"> * This file implements the low-level routines to read and decompress./spaalu
 L26">2 26./a>.spaa class="comment"> * danablocks and metadana blocks../spaalu
 L27">2 27./a>.spaa class="comment"> */./spaalu
 L28">2 28./a>u
 L29">2 29./a>#include <linux/fs.h./a>>u
 L30">2 30./a>#include <linux/vfs.h./a>>u
 L31">2 31./a>#include <linux/slab.h./a>>u
 L32">2 32./a>#include <linux/string.h./a>>u
 L33">2 33./a>#include <linux/buffer_head.h./a>>u
 L34">2 34./a>u
 L35">2 35./a>#include "squashfs_fs.h./a>"u
 L36">2 36./a>#include "squashfs_fs_sb.h./a>"u
 L37">2 37./a>#include "squashfs.h./a>"u
 L38">2 38./a>#include "decompressor.h./a>"u
 L39">2 39./a>u
 L40">2 4opta>.spaa class="comment">/*./spaalu
 L41">2 41./a>.spaa class="comment"> * Read the metadana block length, this is stvred in the first two./spaalu
 L42">2 42./a>.spaa class="comment"> * bytes of the metadana block../spaalu
 L43">2 43./a>.spaa class="comment"> */./spaalu
 L44">2 44./a>static struct2.a href="+code=buffer_head" class="sref">buffer_head./a> *.a href="+code=get_block_length" class="sref">get_block_length./a>(struct2.a href="+code=super_block" class="sref">super_block./a> *.a href="+code=sb" class="sref">sb./a>,u
 L45">2 45./a>                        .a href="+code=u64" class="sref">u64./a> *.a href="+code=cur_index" class="sref">cur_index./a>, int *.a href="+code=offset" class="sref">offset./a>, int *.a href="+code=length" class="sref">length./a>)u
 L46">2 46./a>{u
 L47">2 47./a>        struct2.a href="+code=squashfs_sb_info" class="sref">squashfs_sb_info./a> *.a href="+code=msblk" class="sref">msblk./a> =2.a href="+code=sb" class="sref">sb./a>->.a href="+code=s_fs_info" class="sref">s_fs_info./a>;u
 L48">2 48./a>        struct2.a href="+code=buffer_head" class="sref">buffer_head./a> *.a href="+code=bh" class="sref">bh./a>;u
 L49">2 49./a>u
 L50">2 50./a>        .a href="+code=bh" class="sref">bh./a> =2.a href="+code=sb_bread" class="sref">sb_bread./a>(.a href="+code=sb" class="sref">sb./a>, *.a href="+code=cur_index" class="sref">cur_index./a>);u
 L51">2 51./a>        if (.a href="+code=bh" class="sref">bh./a> ==2.a href="+code=NULL" class="sref">NULL./a>)u
 L52">2 52./a>                return .a href="+code=NULL" class="sref">NULL./a>;u
 L53">2 53./a>u
 L54">2 54./a>        if (.a href="+code=msblk" class="sref">msblk./a>->.a href="+code=devblksize" class="sref">devblksize./a> - *.a href="+code=offset" class="sref">offset./a> ==21) {u
 L55">2 55./a>                *.a href="+code=length" class="sref">length./a> =2(unsigned char) .a href="+code=bh" class="sref">bh./a>->.a href="+code=b_dana" class="sref">b_dana./a>[*.a href="+code=offset" class="sref">offset./a>];u
 L56">2 56./a>                .a href="+code=put_bh" class="sref">put_bh./a>(.a href="+code=bh" class="sref">bh./a>);u
 L57">2 57./a>                .a href="+code=bh" class="sref">bh./a> =2.a href="+code=sb_bread" class="sref">sb_bread./a>(.a href="+code=sb" class="sref">sb./a>, ++(*.a href="+code=cur_index" class="sref">cur_index./a>));u
 L58">2 58./a>                if (.a href="+code=bh" class="sref">bh./a> ==2.a href="+code=NULL" class="sref">NULL./a>)u
 L59">2 59./a>                        return .a href="+code=NULL" class="sref">NULL./a>;u
 L60">2 60./a>                *.a href="+code=length" class="sref">length./a> |=2(unsigned char) .a href="+code=bh" class="sref">bh./a>->.a href="+code=b_dana" class="sref">b_dana./a>[0] << 8;u
 L61">2 61./a>                *.a href="+code=offset" class="sref">offset./a> = 1;u
 L62">2 62./a>        } else {u
 L63">2 63./a>                *.a href="+code=length" class="sref">length./a> =2(unsigned char) .a href="+code=bh" class="sref">bh./a>->.a href="+code=b_dana" class="sref">b_dana./a>[*.a href="+code=offset" class="sref">offset./a>] |u
 L64">2 64./a>                        (unsigned char) .a href="+code=bh" class="sref">bh./a>->.a href="+code=b_dana" class="sref">b_dana./a>[*.a href="+code=offset" class="sref">offset./a> + 1] << 8;u
 L65">2 65./a>                *.a href="+code=offset" class="sref">offset./a> += 2;u
 L66">2 66./a>u
 L67">2 67./a>                if (*.a href="+code=offset" class="sref">offset./a> ==2.a href="+code=msblk" class="sref">msblk./a>->.a href="+code=devblksize" class="sref">devblksize./a>) {u
 L68">2 68./a>                        .a href="+code=put_bh" class="sref">put_bh./a>(.a href="+code=bh" class="sref">bh./a>);u
 L69">2 69./a>                        .a href="+code=bh" class="sref">bh./a> =2.a href="+code=sb_bread" class="sref">sb_bread./a>(.a href="+code=sb" class="sref">sb./a>, ++(*.a href="+code=cur_index" class="sref">cur_index./a>));u
 L70">2 70./a>                        if (.a href="+code=bh" class="sref">bh./a> ==2.a href="+code=NULL" class="sref">NULL./a>)u
 L71">2 71./a>                                return .a href="+code=NULL" class="sref">NULL./a>;u
 L72">2 72./a>                        *.a href="+code=offset" class="sref">offset./a> = 0;u
 L73">2 73./a>                }u
 L74">2 74./a>        }u
 L75">2 75./a>u
 L76">2 76./a>        return .a href="+code=bh" class="sref">bh./a>;u
 L77">2 77./a>}u
 L78">2 78./a>u
 L79">2 79./a>u
 L80">2 8opta>.spaa class="comment">/*./spaalu
 L81">2 81./a>.spaa class="comment"> * Read and decompress a metadana block or danablock.  Length is non-zero./spaalu
 L82">2 82./a>.spaa class="comment"> * if a danablock is being read (the size is stvred elsewhere in the./spaalu
 L83">2 83./a>.spaa class="comment"> * filesystem), otherwise the length is obtained from the first two bytes of./spaalu
 L84">2 84./a>.spaa class="comment"> * the metadana block.  A bit in the length field indicates if the block./spaalu
 L85">2 85./a>.spaa class="comment"> * is stvred uncompressed in the filesystem (usually because compression./spaalu
 L86">2 86./a>.spaa class="comment"> * generated a larger block - this does occasionally happen with compression./spaalu
 L87">2 87./a>.spaa class="comment"> * algorithms)../spaalu
 L88">2 88./a>.spaa class="comment"> */./spaalu
 L89">2 89./a>int .a href="+code=squashfs_read_dana" class="sref">squashfs_read_dana./a>(struct2.a href="+code=super_block" class="sref">super_block./a> *.a href="+code=sb" class="sref">sb./a>, void **.a href="+code=buffer" class="sref">buffer./a>, .a href="+code=u64" class="sref">u64./a> .a href="+code=index" class="sref">index./a>,u
 L90">2 90./a>                        int .a href="+code=length" class="sref">length./a>, .a href="+code=u64" class="sref">u64./a> *.a href="+code=next_index" class="sref">next_index./a>, int .a href="+code=srclength" class="sref">srclength./a>, int .a href="+code=pages" class="sref">pages./a>)u
 L91">2 91./a>{u
 L92">2 92./a>        struct2.a href="+code=squashfs_sb_info" class="sref">squashfs_sb_info./a> *.a href="+code=msblk" class="sref">msblk./a> =2.a href="+code=sb" class="sref">sb./a>->.a href="+code=s_fs_info" class="sref">s_fs_info./a>;u
 L93">2 93./a>        struct2.a href="+code=buffer_head" class="sref">buffer_head./a> **.a href="+code=bh" class="sref">bh./a>;u
 L94">2 94./a>        int .a href="+code=offset" class="sref">offset./a> = .a href="+code=index" class="sref">index./a> & ((1 << .a href="+code=msblk" class="sref">msblk./a>->.a href="+code=devblksize_log2" class="sref">devblksize_log2./a>) - 1);u
 L95">2 95./a>        .a href="+code=u64" class="sref">u64./a> .a href="+code=cur_index" class="sref">cur_index./a> = .a href="+code=index" class="sref">index./a> >> .a href="+code=msblk" class="sref">msblk./a>->.a href="+code=devblksize_log2" class="sref">devblksize_log2./a>;u
 L96">2 96./a>        int .a href="+code=bytes" class="sref">bytes./a>, .a href="+code=compressed" class="sref">compressed./a>, .a href="+code=b" class="sref">b./a> = 0, .a href="+code=k" class="sref">k./a> = 0, .a href="+code=page" class="sref">page./a> = 0, .a href="+code=avail" class="sref">avail./a>;u
 L97">2 97./a>u
 L98">2 98./a>        .a href="+code=bh" class="sref">bh./a> =2.a href="+code=kcalloc" class="sref">kcalloc./a>(((.a href="+code=srclength" class="sref">srclength./a> +2.a href="+code=msblk" class="sref">msblk./a>->.a href="+code=devblksize" class="sref">devblksize./a> - 1)u
 L99">2 99./a>                >> .a href="+code=msblk" class="sref">msblk./a>->.a href="+code=devblksize_log2" class="sref">devblksize_log2./a>) + 1, sizeof(*.a href="+code=bh" class="sref">bh./a>), .a href="+code=GFP_KERNEL" class="sref">GFP_KERNEL./a>);u
 L100">2100./a>        if (.a href="+code=bh" class="sref">bh./a> ==2.a href="+code=NULL" class="sref">NULL./a>)u
 L101">2101./a>                return -.a href="+code=ENOMEM" class="sref">ENOMEM./a>;u
 L102">2102./a>u
 L103">2103./a>        if (.a href="+code=length" class="sref">length./a>) {u
 L104">2104./a>                .spaa class="comment">/*./spaalu
 L105">2105./a>.spaa class="comment">                 * Danablock../spaalu
 L106">2106./a>.spaa class="comment">                 */./spaalu
 L107">2107./a>                .a href="+code=bytes" class="sref">bytes./a> =2-.a href="+code=offset" class="sref">offset./a>;u
 L108">2108./a>                .a href="+code=compressed" class="sref">compressed./a> =2.a href="+code=SQUASHFS_COMPRESSED_BLOCK" class="sref">SQUASHFS_COMPRESSED_BLOCK./a>(.a href="+code=length" class="sref">length./a>);u
 L109">2109./a>                .a href="+code=length" class="sref">length./a> =2.a href="+code=SQUASHFS_COMPRESSED_SIZE_BLOCK" class="sref">SQUASHFS_COMPRESSED_SIZE_BLOCK./a>(.a href="+code=length" class="sref">length./a>);u
 L110">2110./a>                if (.a href="+code=next_index" class="sref">next_index./a>)u
 L111">2111./a>                        *.a href="+code=next_index" class="sref">next_index./a> = .a href="+code=index" class="sref">index./a> +2.a href="+code=length" class="sref">length./a>;u
 L112">2112./a>u
 L113">2113./a>                .a href="+code=TRACE" class="sref">TRACE./a>(.spaa class="string">"Block @ 0x%llx, %scompressed size %d, src size %d\n"
 L114">2114./a>                        .a href="+code=index" class="sref">index./a>, .a href="+code=compressed" class="sref">compressed./a> ? .spaa class="string">"""un"length./a>, .a href="+code=srclength" class="sref">srclength./a>);u
 L115">2115./a>u
 L116">2116./a>                if (.a href="+code=length" class="sref">length./a> < 0 || .a href="+code=length" class="sref">length./a> > .a href="+code=srclength" class="sref">srclength./a> ||u
 L117">2117./a>                                (.a href="+code=index" class="sref">index./a> +2.a href="+code=length" class="sref">length./a>) > .a href="+code=msblk" class="sref">msblk./a>->.a href="+code=bytes_used" class="sref">bytes_used./a>)u
 L118">2118./a>                        goto .a href="+code=read_failure" class="sref">read_failure./a>;u
 L119">2119./a>u
 L120">2120./a>                for (.a href="+code=b" class="sref">b./a> = 0; .a href="+code=bytes" class="sref">bytes./a> < .a href="+code=length" class="sref">length./a>; .a href="+code=b" class="sref">b./a>++, .a href="+code=cur_index" class="sref">cur_index./a>++) {u
 L121">2121./a>                        .a href="+code=bh" class="sref">bh./a>[.a href="+code=b" class="sref">b./a>] =2.a href="+code=sb_getblk" class="sref">sb_getblk./a>(.a href="+code=sb" class="sref">sb./a>, .a href="+code=cur_index" class="sref">cur_index./a>);u
 L122">2122./a>                        if (.a href="+code=bh" class="sref">bh./a>[.a href="+code=b" class="sref">b./a>] ==2.a href="+code=NULL" class="sref">NULL./a>)u
 L123">2123./a>                                goto .a href="+code=block_release" class="sref">block_release./a>;u
 L124">2124./a>                        .a href="+code=bytes" class="sref">bytes./a> +=2.a href="+code=msblk" class="sref">msblk./a>->.a href="+code=devblksize" class="sref">devblksize./a>;u
 L125">2125./a>                }u
 L126">2126./a>                .a href="+code=ll_rw_block" class="sref">ll_rw_block./a>(.a href="+code=READ" class="sref">READ./a>, .a href="+code=b" class="sref">b./a>, .a href="+code=bh" class="sref">bh./a>);u
 L127">2127./a>        } else {u
 L128">2128./a>                .spaa class="comment">/*./spaalu
 L129">2129./a>.spaa class="comment">                 * Metadana block../spaalu
 L130">213opta>.spaa class="comment">                 */./spaalu
 L131">2131./a>                if ((.a href="+code=index" class="sref">index./a> +22) > .a href="+code=msblk" class="sref">msblk./a>->.a href="+code=bytes_used" class="sref">bytes_used./a>)u
 L132">2132./a>                        goto .a href="+code=read_failure" class="sref">read_failure./a>;u
 L133">2133./a>u
 L134">2134./a>                .a href="+code=bh" class="sref">bh./a>[0] =2.a href="+code=get_block_length" class="sref">get_block_length./a>(.a href="+code=sb" class="sref">sb./a>, &.a href="+code=cur_index" class="sref">cur_index./a>, &.a href="+code=offset" class="sref">offset./a>, &.a href="+code=length" class="sref">length./a>);u
 L135">2135./a>                if (.a href="+code=bh" class="sref">bh./a>[0] ==2.a href="+code=NULL" class="sref">NULL./a>)u
 L136">2136./a>                        goto .a href="+code=read_failure" class="sref">read_failure./a>;u
 L137">2137./a>                .a href="+code=b" class="sref">b./a> = 1;u
 L138">2138./a>u
 L139">2139./a>                .a href="+code=bytes" class="sref">bytes./a> =2.a href="+code=msblk" class="sref">msblk./a>->.a href="+code=devblksize" class="sref">devblksize./a> - .a href="+code=offset" class="sref">offset./a>;u
 L140">2140./a>                .a href="+code=compressed" class="sref">compressed./a> =2.a href="+code=SQUASHFS_COMPRESSED" class="sref">SQUASHFS_COMPRESSED./a>(.a href="+code=length" class="sref">length./a>);u
 L141">2141./a>                .a href="+code=length" class="sref">length./a> =2.a href="+code=SQUASHFS_COMPRESSED_SIZE" class="sref">SQUASHFS_COMPRESSED_SIZE./a>(.a href="+code=length" class="sref">length./a>);u
 L142">2142./a>                if (.a href="+code=next_index" class="sref">next_index./a>)u
 L143">2143./a>                        *.a href="+code=next_index" class="sref">next_index./a> = .a href="+code=index" class="sref">index./a> +2.a href="+code=length" class="sref">length./a> +22;u
 L144">2144./a>u
 L145">2145./a>                .a href="+code=TRACE" class="sref">TRACE./a>(.spaa class="string">"Block @ 0x%llx, %scompressed size %d\n"index./a>,u
 L146">2146./a>                                .a href="+code=compressed" class="sref">compressed./a> ? .spaa class="string">"""un"length./a>);u
 L147">2147./a>u
 L148">2148./a>                if (.a href="+code=length" class="sref">length./a> < 0 || .a href="+code=length" class="sref">length./a> > .a href="+code=srclength" class="sref">srclength./a> ||u
 L149">2149./a>                                        (.a href="+code=index" class="sref">index./a> +2.a href="+code=length" class="sref">length./a>) > .a href="+code=msblk" class="sref">msblk./a>->.a href="+code=bytes_used" class="sref">bytes_used./a>)u
 L150">2150./a>                        goto .a href="+code=block_release" class="sref">block_release./a>;u
 L151">2151./a>u
 L152">2152./a>                for (; .a href="+code=bytes" class="sref">bytes./a> < .a href="+code=length" class="sref">length./a>; .a href="+code=b" class="sref">b./a>++) {u
 L153">2153./a>                        .a href="+code=bh" class="sref">bh./a>[.a href="+code=b" class="sref">b./a>] =2.a href="+code=sb_getblk" class="sref">sb_getblk./a>(.a href="+code=sb" class="sref">sb./a>, ++.a href="+code=cur_index" class="sref">cur_index./a>);u
 L154">2154./a>                        if (.a href="+code=bh" class="sref">bh./a>[.a href="+code=b" class="sref">b./a>] ==2.a href="+code=NULL" class="sref">NULL./a>)u
 L155">2155./a>                                goto .a href="+code=block_release" class="sref">block_release./a>;u
 L156">2156./a>                        .a href="+code=bytes" class="sref">bytes./a> +=2.a href="+code=msblk" class="sref">msblk./a>->.a href="+code=devblksize" class="sref">devblksize./a>;u
 L157">2157./a>                }u
 L158">2158./a>                .a href="+code=ll_rw_block" class="sref">ll_rw_block./a>(.a href="+code=READ" class="sref">READ./a>, .a href="+code=b" class="sref">b./a> - 1, .a href="+code=bh" class="sref">bh./a> + 1);u
 L159">2159./a>        }u
 L160">2160./a>u
 L161">2161./a>        if (.a href="+code=compressed" class="sref">compressed./a>) {u
 L162">2162./a>                .a href="+code=length" class="sref">length./a> =2.a href="+code=squashfs_decompress" class="sref">squashfs_decompress./a>(.a href="+code=msblk" class="sref">msblk./a>, .a href="+code=buffer" class="sref">buffer./a>, .a href="+code=bh" class="sref">bh./a>, .a href="+code=b" class="sref">b./a>, .a href="+code=offset" class="sref">offset./a>,u
 L163">2163./a>                         .a href="+code=length" class="sref">length./a>, .a href="+code=srclength" class="sref">srclength./a>, .a href="+code=pages" class="sref">pages./a>);u
 L164">2164./a>                if (.a href="+code=length" class="sref">length./a> < 0)u
 L165">2165./a>                        goto .a href="+code=read_failure" class="sref">read_failure./a>;u
 L166">2166./a>        } else {u
 L167">2167./a>                .spaa class="comment">/*./spaalu
 L168">2168./a>.spaa class="comment">                 * Block is uncompressed../spaalu
 L169">2169./a>.spaa class="comment">                 */./spaalu
 L170">2170./a>                int .a href="+code=i" class="sref">i./a>, .a href="+code=in" class="sref">in./a>, .a href="+code=pg_offset" class="sref">pg_offset./a> =20;u
 L171">2171./a>u
 L172">2172./a>                for (.a href="+code=i" class="sref">i./a> = 0; .a href="+code=i" class="sref">i./a> < .a href="+code=b" class="sref">b./a>; .a href="+code=i" class="sref">i./a>++) {u
 L173">2173./a>                        .a href="+code=wait_on_buffer" class="sref">wait_on_buffer./a>(.a href="+code=bh" class="sref">bh./a>[.a href="+code=i" class="sref">i./a>]);u
 L174">2174./a>                        if (!.a href="+code=buffer_uptodate" class="sref">buffer_uptodate./a>(.a href="+code=bh" class="sref">bh./a>[.a href="+code=i" class="sref">i./a>]))u
 L175">2175./a>                                goto .a href="+code=block_release" class="sref">block_release./a>;u
 L176">2176./a>                }u
 L177">2177./a>u
 L178">2178./a>                for (.a href="+code=bytes" class="sref">bytes./a> =2.a href="+code=length" class="sref">length./a>; .a href="+code=k" class="sref">k./a> < .a href="+code=b" class="sref">b./a>; .a href="+code=k" class="sref">k./a>++) {u
 L179">2179./a>                        .a href="+code=in" class="sref">in./a> =2.a href="+code=min" class="sref">min./a>(.a href="+code=bytes" class="sref">bytes./a>, .a href="+code=msblk" class="sref">msblk./a>->.a href="+code=devblksize" class="sref">devblksize./a> - .a href="+code=offset" class="sref">offset./a>);u
 L180">2180./a>                        .a href="+code=bytes" class="sref">bytes./a> -= .a href="+code=in" class="sref">in./a>;u
 L181">2181./a>                        while (.a href="+code=in" class="sref">in./a>) {u
 L182">2182./a>                                if (.a href="+code=pg_offset" class="sref">pg_offset./a> == .a href="+code=PAGE_CACHE_SIZE" class="sref">PAGE_CACHE_SIZE./a>) {u
 L183">2183./a>                                        .a href="+code=page" class="sref">page./a>++;u
 L184">2184./a>                                        .a href="+code=pg_offset" class="sref">pg_offset./a> =20;u
 L185">2185./a>                                }u
 L186">2186./a>                                .a href="+code=avail" class="sref">avail./a> =2.a href="+code=min_t" class="sref">min_t./a>(int, .a href="+code=in" class="sref">in./a>, .a href="+code=PAGE_CACHE_SIZE" class="sref">PAGE_CACHE_SIZE./a> -u
 L187">2187./a>                                                .a href="+code=pg_offset" class="sref">pg_offset./a>);u
 L188">2188./a>                                .a href="+code=memcpy" class="sref">memcpy./a>(.a href="+code=buffer" class="sref">buffer./a>[.a href="+code=page" class="sref">page./a>] +2.a href="+code=pg_offset" class="sref">pg_offset./a>,u
 L189">2189./a>                                                .a href="+code=bh" class="sref">bh./a>[.a href="+code=k" class="sref">k./a>]->.a href="+code=b_dana" class="sref">b_dana./a> +2.a href="+code=offset" class="sref">offset./a>, .a href="+code=avail" class="sref">avail./a>);u
 L190">2190./a>                                .a href="+code=in" class="sref">in./a> -= .a href="+code=avail" class="sref">avail./a>;u
 L191">2191./a>                                .a href="+code=pg_offset" class="sref">pg_offset./a> +=2.a href="+code=avail" class="sref">avail./a>;u
 L192">2192./a>                                .a href="+code=offset" class="sref">offset./a> +=2.a href="+code=avail" class="sref">avail./a>;u
 L193">2193./a>                        }u
 L194">2194./a>                        .a href="+code=offset" class="sref">offset./a> = 0;u
 L195">2195./a>                        .a href="+code=put_bh" class="sref">put_bh./a>(.a href="+code=bh" class="sref">bh./a>[.a href="+code=k" class="sref">k./a>]);u
 L196">2196./a>                }u
 L197">2197./a>        }u
 L198">2198./a>u
 L199">2199./a>        .a href="+code=kfree" class="sref">kfree./a>(.a href="+code=bh" class="sref">bh./a>);u
 L200">2200./a>        return .a href="+code=length" class="sref">length./a>;u
 L201">2201./a>u
 L202">2202./a>.a href="+code=block_release" class="sref">block_release./a>:u
 L203">2203./a>        for (; .a href="+code=k" class="sref">k./a> < .a href="+code=b" class="sref">b./a>; .a href="+code=k" class="sref">k./a>++)u
 L204">2204./a>                .a href="+code=put_bh" class="sref">put_bh./a>(.a href="+code=bh" class="sref">bh./a>[.a href="+code=k" class="sref">k./a>]);u
 L205">2205./a>u
 L206">2206./a>.a href="+code=read_failure" class="sref">read_failure./a>:u
 L207">2207./a>        .a href="+code=ERROR" class="sref">ERROR./a>(.spaa class="string">"squashfs_read_dana failed to read block 0x%llx\n"
 L208">2208./a>                                        (unsigned long long) .a href="+code=index" class="sref">index./a>);u
 L209">2209./a>        .a href="+code=kfree" class="sref">kfree./a>(.a href="+code=bh" class="sref">bh./a>);u
 L210">2210./a>        return -.a href="+code=EIO" class="sref">EIO./a>;u
 L211">2211./a>}u
 L212">2212./a>
lxr.linux.no kindly hosted by Redpill Linpro AS./a>, provider of Linux consulting and operations services since21995.