@@ -2138,6 +2138,8 @@ void Locker::adjust_cap_wanted(Capability *cap, int wanted, int issue_seq)
}
CInode *cur = cap->get_inode();
+ if (!cur->is_auth())
+ return;
if (cap->wanted() == 0) {
if (cur->item_open_file.is_on_list() &&
!cur->is_any_caps_wanted()) {
@@ -1093,6 +1093,8 @@ void Migrator::finish_export_inode(CInode *in, utime_t now, list<Context*>& fini
in->clear_dirty_rstat();
+ in->item_open_file.remove_myself();
+
// waiters
in->take_waiting(CInode::WAIT_ANY_MASK, finished);
@@ -2553,7 +2553,8 @@ void Server::handle_client_open(MDRequest *mdr)
mds->locker->check_inode_max_size(cur);
// make sure this inode gets into the journal
- if (!cur->item_open_file.is_on_list() && cur->last == CEPH_NOSNAP) {
+ if (cur->is_auth() && cur->last == CEPH_NOSNAP &&
+ !cur->item_open_file.is_on_list()) {
LogSegment *ls = mds->mdlog->get_current_segment();
EOpen *le = new EOpen(mds->mdlog);
mdlog->start_entry(le);
@@ -145,7 +145,7 @@ void LogSegment::try_to_expire(MDS *mds, C_GatherBuilder &gather_bld)
CInode *in = *p;
assert(in->last == CEPH_NOSNAP);
++p;
- if (in->is_any_caps()) {
+ if (in->is_auth() && in->is_any_caps()) {
if (in->is_any_caps_wanted()) {
dout(20) << "try_to_expire requeueing open file " << *in << dendl;
if (!le) {