unsigned s;
::decode(s, blp);
state &= MASK_STATE_IMPORT_KEPT;
- state |= (s & MASK_STATE_EXPORTED);
+ state_set(STATE_AUTH | (s & MASK_STATE_EXPORTED));
+
if (is_dirty()) {
get(PIN_DIRTY);
_mark_dirty(ls);
if (!in) {
in = new CInode(mds->mdcache, true, 1, last);
added = true;
- } else {
- in->state_set(CInode::STATE_AUTH);
}
// state after link -- or not! -sage
// assimilate state
dir->decode_import(blp, now, ls);
- // mark (may already be marked from get_or_open_dir() above)
- if (!dir->is_auth())
- dir->state_set(CDir::STATE_AUTH);
-
// adjust replica list
//assert(!dir->is_replica(oldauth)); // not true on failed export
dir->add_replica(oldauth, CDir::EXPORT_NONCE);