* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2011, 2012, Intel Corporation.
+ * Copyright (c) 2011, 2013, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
* array in case it might be useful. Not needed if doing an MDS-side upcall. */
void ll_i2gids(__u32 *suppgids, struct inode *i1, struct inode *i2)
{
- LASSERT(i1 != NULL);
- LASSERT(suppgids != NULL);
-
- if (cfs_curproc_is_in_groups(i1->i_stbuf.st_gid))
- suppgids[0] = i1->i_stbuf.st_gid;
- else
- suppgids[0] = -1;
-
- if (i2) {
- if (cfs_curproc_is_in_groups(i2->i_stbuf.st_gid))
- suppgids[1] = i2->i_stbuf.st_gid;
- else
- suppgids[1] = -1;
- } else {
- suppgids[1] = -1;
- }
+ LASSERT(i1 != NULL);
+ LASSERT(suppgids != NULL);
+
+ if (in_group_p(i1->i_stbuf.st_gid))
+ suppgids[0] = i1->i_stbuf.st_gid;
+ else
+ suppgids[0] = -1;
+
+ if (i2) {
+ if (in_group_p(i2->i_stbuf.st_gid))
+ suppgids[1] = i2->i_stbuf.st_gid;
+ else
+ suppgids[1] = -1;
+ } else {
+ suppgids[1] = -1;
+ }
}
void llu_prep_md_op_data(struct md_op_data *op_data, struct inode *i1,
if (oa == NULL)
GOTO(out_free_memmd, rc = -ENOMEM);
- oa->o_id = lsm->lsm_object_id;
- oa->o_seq = lsm->lsm_object_seq;
+ oa->o_oi = lsm->lsm_oi;
oa->o_mode = body->mode & S_IFMT;
oa->o_valid = OBD_MD_FLID | OBD_MD_FLTYPE | OBD_MD_FLGROUP;
obdo_set_parent_fid(oa, &llu_i2info(dir)->lli_fid);
}
}
- rc = obd_destroy(NULL, llu_i2obdexp(dir), oa, lsm, &oti, NULL, NULL);
- OBDO_FREE(oa);
- if (rc)
- CERROR("obd destroy objid 0x"LPX64" error %d\n",
- lsm->lsm_object_id, rc);
- out_free_memmd:
- obd_free_memmd(llu_i2obdexp(dir), &lsm);
- out:
- return rc;
+ rc = obd_destroy(NULL, llu_i2obdexp(dir), oa, lsm, &oti, NULL, NULL);
+ OBDO_FREE(oa);
+ if (rc)
+ CERROR("obd destroy objid "DOSTID" error %d\n",
+ POSTID(&lsm->lsm_oi), rc);
+out_free_memmd:
+ obd_free_memmd(llu_i2obdexp(dir), &lsm);
+out:
+ return rc;
}
/** Cliens updates SOM attributes on MDS: obd_getattr and md_setattr. */