Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 62b15300 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'driver-core-3.19-rc5' of...

Merge tag 'driver-core-3.19-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core fix from Greg KH:
 "Here is one kernfs fix for a reported issue for 3.19-rc5.

  It has been in linux-next for a while"

* tag 'driver-core-3.19-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
  kernfs: Fix kernfs_name_compare
parents 7b78de8c 72392ed0
Loading
Loading
Loading
Loading
+8 −4
Original line number Original line Diff line number Diff line
@@ -201,10 +201,14 @@ static unsigned int kernfs_name_hash(const char *name, const void *ns)
static int kernfs_name_compare(unsigned int hash, const char *name,
static int kernfs_name_compare(unsigned int hash, const char *name,
			       const void *ns, const struct kernfs_node *kn)
			       const void *ns, const struct kernfs_node *kn)
{
{
	if (hash != kn->hash)
	if (hash < kn->hash)
		return hash - kn->hash;
		return -1;
	if (ns != kn->ns)
	if (hash > kn->hash)
		return ns - kn->ns;
		return 1;
	if (ns < kn->ns)
		return -1;
	if (ns > kn->ns)
		return 1;
	return strcmp(name, kn->name);
	return strcmp(name, kn->name);
}
}