OSDN Git Service

staging: lustre: llite: simplify ll_find_alias()
authorNeilBrown <neilb@suse.com>
Mon, 12 Feb 2018 21:30:48 +0000 (08:30 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Feb 2018 14:15:08 +0000 (15:15 +0100)
commit7e08e9a8942dfc38693edf2e389cde620e918356
treebfebad4d652dd55212c133ae95d7e309f9308af2
parentac63774689265d50bc1d83ac9b7889ac7e645b5a
staging: lustre: llite: simplify ll_find_alias()

Now that ll_find_alias is only searching for one type
of dentry, we can return as soon as we find it.
This allows substantial simplification, and brings the
bonus that we don't need to take the d_lock again just
to increment the ref-count.  We can increment it immediately
that the dentry is found.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/llite/namei.c