LASSERT(lli->lli_opendir_pid == 0);
}
+ spin_lock(&lli->lli_lock);
ll_i2info(inode)->lli_flags &= ~LLIF_MDS_SIZE_LOCK;
+ spin_unlock(&lli->lli_lock);
md_null_inode(sbi->ll_md_exp, ll_inode2fid(inode));
LASSERT(!lli->lli_open_fd_write_count);
/* Use old size assignment to avoid
* deadlock bz14138 & bz14326 */
i_size_write(inode, body->size);
+ spin_lock(&lli->lli_lock);
lli->lli_flags |= LLIF_MDS_SIZE_LOCK;
+ spin_unlock(&lli->lli_lock);
}
ldlm_lock_decref(&lockh, mode);
}
CDEBUG(D_INODE, "invaliding layout %d.\n", rc);
}
- if (bits & MDS_INODELOCK_UPDATE)
+ if (bits & MDS_INODELOCK_UPDATE) {
+ spin_lock(&lli->lli_lock);
lli->lli_flags &= ~LLIF_MDS_SIZE_LOCK;
+ spin_unlock(&lli->lli_lock);
+ }
if (S_ISDIR(inode->i_mode) &&
(bits & MDS_INODELOCK_UPDATE)) {