Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mds: relocate PTRWAITER put near get #14921

Merged
merged 1 commit into from May 11, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/mds/Locker.cc
Expand Up @@ -1052,8 +1052,8 @@ class C_Locker_Eval : public LockerContext {
p->get(MDSCacheObject::PIN_PTRWAITER);
}
void finish(int r) override {
p->put(MDSCacheObject::PIN_PTRWAITER);
locker->try_eval(p, mask);
p->put(MDSCacheObject::PIN_PTRWAITER);
}
};

Expand Down Expand Up @@ -1770,6 +1770,7 @@ class C_Locker_FileUpdate_finish : public LockerLogContext {
}
void finish(int r) override {
locker->file_update_finish(in, mut, share, client, cap, ack);
in->put(CInode::PIN_PTRWAITER);
}
};

Expand All @@ -1778,7 +1779,6 @@ void Locker::file_update_finish(CInode *in, MutationRef& mut, bool share, client
{
dout(10) << "file_update_finish on " << *in << dendl;
in->pop_and_dirty_projected_inode(mut->ls);
in->put(CInode::PIN_PTRWAITER);

mut->apply();

Expand Down Expand Up @@ -2146,9 +2146,9 @@ class C_MDL_RequestInodeFileCaps : public LockerContext {
in->get(CInode::PIN_PTRWAITER);
}
void finish(int r) override {
in->put(CInode::PIN_PTRWAITER);
if (!in->is_auth())
locker->request_inode_file_caps(in);
in->put(CInode::PIN_PTRWAITER);
}
};

Expand Down Expand Up @@ -2225,9 +2225,9 @@ class C_MDL_CheckMaxSize : public LockerContext {
in->get(CInode::PIN_PTRWAITER);
}
void finish(int r) override {
in->put(CInode::PIN_PTRWAITER);
if (in->is_auth())
locker->check_inode_max_size(in, false, new_max_size, newsize, mtime);
in->put(CInode::PIN_PTRWAITER);
}
};

Expand Down