Lines Matching refs:wbuf
1683 static int read_wbuf(struct ubifs_wbuf *wbuf, void *buf, int len, int lnum, in read_wbuf() argument
1686 const struct ubifs_info *c = wbuf->c; in read_wbuf()
1690 ubifs_assert(c, wbuf && lnum >= 0 && lnum < c->leb_cnt && offs >= 0); in read_wbuf()
1694 spin_lock(&wbuf->lock); in read_wbuf()
1695 overlap = (lnum == wbuf->lnum && offs + len > wbuf->offs); in read_wbuf()
1698 spin_unlock(&wbuf->lock); in read_wbuf()
1703 rlen = wbuf->offs - offs; in read_wbuf()
1708 memcpy(buf + rlen, wbuf->buf + offs + rlen - wbuf->offs, len - rlen); in read_wbuf()
1709 spin_unlock(&wbuf->lock); in read_wbuf()
1791 struct ubifs_wbuf *wbuf; in ubifs_tnc_bulk_read() local
1802 wbuf = ubifs_get_wbuf(c, lnum); in ubifs_tnc_bulk_read()
1803 if (wbuf) in ubifs_tnc_bulk_read()
1804 err = read_wbuf(wbuf, bu->buf, len, lnum, offs); in ubifs_tnc_bulk_read()