]> git.baikalelectronics.ru Git - kernel.git/commit
ceph: handle racing calls to ceph_init_dentry
authorSage Weil <sage@newdream.net>
Tue, 26 Jul 2011 18:30:15 +0000 (11:30 -0700)
committerSage Weil <sage@newdream.net>
Tue, 26 Jul 2011 18:30:15 +0000 (11:30 -0700)
commit29fae4543945ec36b728575b5ba0d7d5f4834c2e
tree228a26f8ee7d555d67c6a00e5346f3b558a2e48c
parent71b171c3cd7b81f15097a36962b84666bd550a98
ceph: handle racing calls to ceph_init_dentry

The ->lookup() and prepopulate_readdir() callers are working with unhashed
dentries, so we don't have to worry.  The export.c callers, though, need
to initialize something they got back from d_obtain_alias() and are
potentially racing with other callers.  Make sure we don't return unless
the dentry is properly initialized (by us or someone else).

Reported-by: Al Viro <viro@ZenIV.linux.org.uk>
Reviewed-by: Yehuda Sadeh <yehuda@hq.newdream.net>
Signed-off-by: Sage Weil <sage@newdream.net>
fs/ceph/dir.c