b->blocks = 0;
/* if no object is allocated on osts, the size on mds is valid. b=22272 */
b->valid |= OBD_MD_FLSIZE | OBD_MD_FLBLOCKS;
- } else if ((ma->ma_valid & MA_LOV) && ma->ma_lmm &&
- (ma->ma_lmm->lmm_pattern & LOV_PATTERN_F_RELEASED)) {
+ } else if ((ma->ma_valid & MA_LOV) && ma->ma_lmm != NULL &&
+ ma->ma_lmm->lmm_pattern & LOV_PATTERN_F_RELEASED) {
/* A released file stores its size on MDS. */
b->blocks = 0;
b->valid |= OBD_MD_FLSIZE | OBD_MD_FLBLOCKS;
/* the Lustre protocol supposes to return default striping
* on the user-visible root if explicitly requested */
if ((ma->ma_valid & MA_LOV) == 0 && S_ISDIR(la->la_mode) &&
- (ma->ma_need & MA_LOV_DEF && is_root) && (ma->ma_need & MA_LOV)) {
+ (ma->ma_need & MA_LOV_DEF && is_root) && ma->ma_need & MA_LOV) {
struct lu_fid rootfid;
struct mdt_object *root;
struct mdt_device *mdt = info->mti_mdt;
LASSERT(mdt_object_remote(o));
- LASSERT((ibits & MDS_INODELOCK_UPDATE));
+ LASSERT(ibits & MDS_INODELOCK_UPDATE);
memset(einfo, 0, sizeof(*einfo));
einfo->ei_type = LDLM_IBITS;
},
[MDT_IT_OCREAT] = {
.it_fmt = &RQF_LDLM_INTENT,
- .it_flags = MUTABOR,
+ /*
+ * OCREAT is not a MUTABOR request as if the file
+ * already exists.
+ * We do the extra check of OBD_CONNECT_RDONLY in
+ * mdt_reint_open() when we really need to create
+ * the object.
+ */
+ .it_flags = 0,
.it_act = mdt_intent_reint,
.it_reint = REINT_OPEN
},
const char *identity_upcall = "NONE";
struct md_device *next;
int rc;
- int node_id;
+ long node_id;
mntopt_t mntopts;
ENTRY;
linkea_entry_unpack(lee, &reclen, tmpname, tmpfid);
/* If set, use link #linkno for path lookup, otherwise use
link #0. Only do this for the final path element. */
- if ((pli->pli_fidcount == 0) &&
- (pli->pli_linkno < leh->leh_reccount)) {
+ if (pli->pli_fidcount == 0 &&
+ pli->pli_linkno < leh->leh_reccount) {
int count;
for (count = 0; count < pli->pli_linkno; count++) {
lee = (struct link_ea_entry *)