mainlining shenanigans
a22c3d41d1
ll_dcompare is used in two slightly different contexts. It is called (from __d_lookup, __d_lookup_rcu, and d_exact_alias) to compare a name against a dentry that is already in the dcache. It is also called (from d_alloc_parallel) to compare a name against a dentry that is not in the dcache yet, but is part of an active "lookup" or "atomic_open" call. In the first case we need to avoid matching against "invalid" dentries as a match implies something about ldlm locks which is not accurate. In the second case we need to allow matching against "invalid" dentries as the dentry will always be invalid (set by ll_d_init()) but we still want to guard against multiple concurrent lookups of the same name. d_alloc_parallel() will repeat the call to ll_dcompare() after the lookup has finished, and if the dentry is still invalid, the whole d_alloc_parallel() process is repeated. This assures us that it is safe to report success whenever d_in_lookup(). With this patch, there will never be two threads concurrently in ll_lookup_nd(), looking up the same name in the same directory. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
||
---|---|---|
arch | ||
block | ||
certs | ||
crypto | ||
Documentation | ||
drivers | ||
firmware | ||
fs | ||
include | ||
init | ||
ipc | ||
kernel | ||
lib | ||
LICENSES | ||
mm | ||
net | ||
samples | ||
scripts | ||
security | ||
sound | ||
tools | ||
usr | ||
virt | ||
.cocciconfig | ||
.get_maintainer.ignore | ||
.gitattributes | ||
.gitignore | ||
.mailmap | ||
COPYING | ||
CREDITS | ||
Kbuild | ||
Kconfig | ||
MAINTAINERS | ||
Makefile | ||
README |
Linux kernel ============ This file was moved to Documentation/admin-guide/README.rst Please notice that there are several guides for kernel developers and users. These guides can be rendered in a number of formats, like HTML and PDF. In order to build the documentation, use ``make htmldocs`` or ``make pdfdocs``. There are various text files in the Documentation/ subdirectory, several of them using the Restructured Text markup notation. See Documentation/00-INDEX for a list of what is contained in each file. Please read the Documentation/process/changes.rst file, as it contains the requirements for building and running the kernel, and information about the problems which may result by upgrading your kernel.