]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
client: be careful about replacing dentries during readdir assimilation
authorSage Weil <sage@newdream.net>
Wed, 24 Aug 2011 23:51:15 +0000 (16:51 -0700)
committerSage Weil <sage@newdream.net>
Wed, 24 Aug 2011 23:51:15 +0000 (16:51 -0700)
commit3ef32bc6b68c19858e68c73b5df746dd8d316fdf
tree63a456d1839589ba483364f18f131d3009445ab2
parent2a4cf8f887476dcca1beb233effafc0b1e5aff25
client: be careful about replacing dentries during readdir assimilation

When we are assimilate readdir results into our cache, we need to be more
careful about replacing existing dentries.  We were calling
insert_dentry_inode(), which would replace a name if it already exists,
which might include pd->first, an active iterator.

Move the dentry link/relink into the caller (where we already have an
iterator pointing to the existing item, if any).  Then update the dentry
lease information separately.

Fixes: #1391
Signed-off-by: Sage Weil <sage@newdream.net>
src/client/Client.cc