in ll_set_attr_raw, if ll_extent_lock call fails, the newly allocated
obdo has not been freed before return
i=johann
i=johann
i=dmitry.zoguine
static inline void lustre_get_wire_obdo(struct obdo *lobdo, struct obdo *wobdo)
{
static inline void lustre_get_wire_obdo(struct obdo *lobdo, struct obdo *wobdo)
{
- obd_flag local_flags = lobdo->o_flags & OBD_FL_LOCAL_MASK;
+ obd_flag local_flags = 0;
+
+ if (lobdo->o_valid & OBD_MD_FLFLAGS)
+ local_flags = lobdo->o_flags & OBD_FL_LOCAL_MASK;
LASSERT(!(wobdo->o_flags & OBD_FL_LOCAL_MASK));
memcpy(lobdo, wobdo, sizeof(*lobdo));
LASSERT(!(wobdo->o_flags & OBD_FL_LOCAL_MASK));
memcpy(lobdo, wobdo, sizeof(*lobdo));
- lobdo->o_flags &= ~OBD_FL_LOCAL_MASK;
- lobdo->o_flags |= local_flags;
+ if (local_flags != 0) {
+ lobdo->o_valid |= OBD_MD_FLFLAGS;
+ lobdo->o_flags &= ~OBD_FL_LOCAL_MASK;
+ lobdo->o_flags |= local_flags;
+ }
}
extern void lustre_swab_obdo (struct obdo *o);
}
extern void lustre_swab_obdo (struct obdo *o);