osd_map_remote_to_local(pos, len, &npages, lnb);
for (i = 0; i < npages; i++, lnb++) {
-
- /* We still set up for ungranted pages so that granted pages
- * can be written to disk as they were promised, and portals
- * needs to keep the pages all aligned properly. */
- lnb->dentry = (void *) obj;
-
lnb->page = osd_get_page(d, lnb->lnb_file_offset, rw);
if (lnb->page == NULL)
GOTO(cleanup, rc = -ENOMEM);
static int osd_ldiskfs_map_inode_pages(struct inode *inode, struct page **page,
int pages, unsigned long *blocks,
- int create, struct mutex *optional_mutex)
+ int create)
{
int rc;
blocks, create);
return rc;
}
- if (optional_mutex != NULL)
- mutex_lock(optional_mutex);
rc = osd_ldiskfs_map_bm_inode_pages(inode, page, pages, blocks, create);
- if (optional_mutex != NULL)
- mutex_unlock(optional_mutex);
return rc;
}
if (iobuf->dr_npages) {
rc = osd_ldiskfs_map_inode_pages(inode, iobuf->dr_pages,
iobuf->dr_npages,
- iobuf->dr_blocks,
- 0, NULL);
+ iobuf->dr_blocks, 0);
if (likely(rc == 0)) {
rc = osd_do_bio(osd, inode, iobuf);
/* do IO stats for preparation reads */
/* make sure the over quota flags were not set */
lnb[0].flags &= ~(OBD_BRW_OVER_USRQUOTA | OBD_BRW_OVER_GRPQUOTA);
- rc = osd_declare_inode_qid(env, inode->i_uid, inode->i_gid,
+ rc = osd_declare_inode_qid(env, i_uid_read(inode), i_gid_read(inode),
quota_space, oh, true, true, &flags,
ignore_quota);
} else if (iobuf->dr_npages > 0) {
rc = osd_ldiskfs_map_inode_pages(inode, iobuf->dr_pages,
iobuf->dr_npages,
- iobuf->dr_blocks,
- 1, NULL);
+ iobuf->dr_blocks, 1);
} else {
/* no pages to write, no transno is needed */
thandle->th_local = 1;
if (iobuf->dr_npages) {
rc = osd_ldiskfs_map_inode_pages(inode, iobuf->dr_pages,
iobuf->dr_npages,
- iobuf->dr_blocks,
- 0, NULL);
+ iobuf->dr_blocks, 0);
rc = osd_do_bio(osd, inode, iobuf);
/* IO stats will be done in osd_bufs_put() */
* as llog or last_rcvd files. We needn't enforce quota on those
* objects, so always set the lqi_space as 0. */
if (inode != NULL)
- rc = osd_declare_inode_qid(env, inode->i_uid, inode->i_gid,
- 0, oh, true, true, NULL, false);
+ rc = osd_declare_inode_qid(env, i_uid_read(inode),
+ i_gid_read(inode), 0, oh, true,
+ true, NULL, false);
RETURN(rc);
}
inode = osd_dt_obj(dt)->oo_inode;
LASSERT(inode);
- rc = osd_declare_inode_qid(env, inode->i_uid, inode->i_gid, 0, oh,
- true, true, NULL, false);
+ rc = osd_declare_inode_qid(env, i_uid_read(inode), i_gid_read(inode),
+ 0, oh, true, true, NULL, false);
RETURN(rc);
}