ow 23 arch/riscv/include/asm/barrier.h #define wmb() RISCV_FENCE(ow,ow) ow 94 fs/orangefs/inode.c static int orangefs_writepages_work(struct orangefs_writepages *ow, ow 97 fs/orangefs/inode.c struct inode *inode = ow->pages[0]->mapping->host; ow 107 fs/orangefs/inode.c for (i = 0; i < ow->npages; i++) { ow 108 fs/orangefs/inode.c set_page_writeback(ow->pages[i]); ow 109 fs/orangefs/inode.c ow->bv[i].bv_page = ow->pages[i]; ow 110 fs/orangefs/inode.c ow->bv[i].bv_len = min(page_offset(ow->pages[i]) + PAGE_SIZE, ow 111 fs/orangefs/inode.c ow->off + ow->len) - ow 112 fs/orangefs/inode.c max(ow->off, page_offset(ow->pages[i])); ow 114 fs/orangefs/inode.c ow->bv[i].bv_offset = ow->off - ow 115 fs/orangefs/inode.c page_offset(ow->pages[i]); ow 117 fs/orangefs/inode.c ow->bv[i].bv_offset = 0; ow 119 fs/orangefs/inode.c iov_iter_bvec(&iter, WRITE, ow->bv, ow->npages, ow->len); ow 121 fs/orangefs/inode.c WARN_ON(ow->off >= len); ow 122 fs/orangefs/inode.c if (ow->off + ow->len > len) ow 123 fs/orangefs/inode.c ow->len = len - ow->off; ow 125 fs/orangefs/inode.c off = ow->off; ow 126 fs/orangefs/inode.c wr.uid = ow->uid; ow 127 fs/orangefs/inode.c wr.gid = ow->gid; ow 128 fs/orangefs/inode.c ret = wait_for_direct_io(ORANGEFS_IO_WRITE, inode, &off, &iter, ow->len, ow 131 fs/orangefs/inode.c for (i = 0; i < ow->npages; i++) { ow 132 fs/orangefs/inode.c SetPageError(ow->pages[i]); ow 133 fs/orangefs/inode.c mapping_set_error(ow->pages[i]->mapping, ret); ow 134 fs/orangefs/inode.c if (PagePrivate(ow->pages[i])) { ow 136 fs/orangefs/inode.c page_private(ow->pages[i]); ow 137 fs/orangefs/inode.c ClearPagePrivate(ow->pages[i]); ow 138 fs/orangefs/inode.c put_page(ow->pages[i]); ow 141 fs/orangefs/inode.c end_page_writeback(ow->pages[i]); ow 142 fs/orangefs/inode.c unlock_page(ow->pages[i]); ow 146 fs/orangefs/inode.c for (i = 0; i < ow->npages; i++) { ow 147 fs/orangefs/inode.c if (PagePrivate(ow->pages[i])) { ow 149 fs/orangefs/inode.c page_private(ow->pages[i]); ow 150 fs/orangefs/inode.c ClearPagePrivate(ow->pages[i]); ow 151 fs/orangefs/inode.c put_page(ow->pages[i]); ow 154 fs/orangefs/inode.c end_page_writeback(ow->pages[i]); ow 155 fs/orangefs/inode.c unlock_page(ow->pages[i]); ow 164 fs/orangefs/inode.c struct orangefs_writepages *ow = data; ow 178 fs/orangefs/inode.c if (ow->npages == 0) { ow 179 fs/orangefs/inode.c ow->off = wr->pos; ow 180 fs/orangefs/inode.c ow->len = wr->len; ow 181 fs/orangefs/inode.c ow->uid = wr->uid; ow 182 fs/orangefs/inode.c ow->gid = wr->gid; ow 183 fs/orangefs/inode.c ow->pages[ow->npages++] = page; ow 187 fs/orangefs/inode.c if (!uid_eq(ow->uid, wr->uid) || !gid_eq(ow->gid, wr->gid)) { ow 188 fs/orangefs/inode.c orangefs_writepages_work(ow, wbc); ow 189 fs/orangefs/inode.c ow->npages = 0; ow 193 fs/orangefs/inode.c if (ow->off + ow->len == wr->pos) { ow 194 fs/orangefs/inode.c ow->len += wr->len; ow 195 fs/orangefs/inode.c ow->pages[ow->npages++] = page; ow 201 fs/orangefs/inode.c if (ow->npages) { ow 202 fs/orangefs/inode.c orangefs_writepages_work(ow, wbc); ow 203 fs/orangefs/inode.c ow->npages = 0; ow 210 fs/orangefs/inode.c if (ow->npages == ow->maxpages) { ow 211 fs/orangefs/inode.c orangefs_writepages_work(ow, wbc); ow 212 fs/orangefs/inode.c ow->npages = 0; ow 221 fs/orangefs/inode.c struct orangefs_writepages *ow; ow 224 fs/orangefs/inode.c ow = kzalloc(sizeof(struct orangefs_writepages), GFP_KERNEL); ow 225 fs/orangefs/inode.c if (!ow) ow 227 fs/orangefs/inode.c ow->maxpages = orangefs_bufmap_size_query()/PAGE_SIZE; ow 228 fs/orangefs/inode.c ow->pages = kcalloc(ow->maxpages, sizeof(struct page *), GFP_KERNEL); ow 229 fs/orangefs/inode.c if (!ow->pages) { ow 230 fs/orangefs/inode.c kfree(ow); ow 233 fs/orangefs/inode.c ow->bv = kcalloc(ow->maxpages, sizeof(struct bio_vec), GFP_KERNEL); ow 234 fs/orangefs/inode.c if (!ow->bv) { ow 235 fs/orangefs/inode.c kfree(ow->pages); ow 236 fs/orangefs/inode.c kfree(ow); ow 240 fs/orangefs/inode.c ret = write_cache_pages(mapping, wbc, orangefs_writepages_callback, ow); ow 241 fs/orangefs/inode.c if (ow->npages) ow 242 fs/orangefs/inode.c ret = orangefs_writepages_work(ow, wbc); ow 244 fs/orangefs/inode.c kfree(ow->pages); ow 245 fs/orangefs/inode.c kfree(ow->bv); ow 246 fs/orangefs/inode.c kfree(ow);