Skip to content

Commit

Permalink
mds: fix incorrect assertion in Server::_dir_is_nonempty()
Browse files Browse the repository at this point in the history
when filelock is in XLOCKDONE state. client of xlocker can rdlock
the filelock. In that case, only client of xlocker can read the lock.

Fixes: http://tracker.ceph.com/issues/18578
Signed-off-by: Yan, Zheng <zyan@redhat.com>
  • Loading branch information
ukernel committed Jan 19, 2017
1 parent 5f651d8 commit fe4ab52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mds/Server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6098,7 +6098,7 @@ bool Server::_dir_is_nonempty(MDRequestRef& mdr, CInode *in)
{
dout(10) << "dir_is_nonempty " << *in << dendl;
assert(in->is_auth());
assert(in->filelock.can_read(-1));
assert(in->filelock.can_read(mdr->get_client()));

frag_info_t dirstat;
version_t dirstat_version = in->get_projected_inode()->dirstat.version;
Expand Down

0 comments on commit fe4ab52

Please sign in to comment.