Skip to content

Commit

Permalink
Merge tag 'driver-core-3.19-rc5' of git://git.kernel.org/pub/scm/linu…
Browse files Browse the repository at this point in the history
…x/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
  • Loading branch information
torvalds committed Jan 16, 2015
2 parents 7b78de8 + 72392ed commit 62b1530
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions fs/kernfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
const void *ns, const struct kernfs_node *kn)
{
if (hash != kn->hash)
return hash - kn->hash;
if (ns != kn->ns)
return ns - kn->ns;
if (hash < kn->hash)
return -1;
if (hash > kn->hash)
return 1;
if (ns < kn->ns)
return -1;
if (ns > kn->ns)
return 1;
return strcmp(name, kn->name);
}

Expand Down

0 comments on commit 62b1530

Please sign in to comment.