diff options
author | Felipe Balbi | 2015-01-19 09:57:20 -0600 |
---|---|---|
committer | Felipe Balbi | 2015-01-19 09:57:20 -0600 |
commit | d1fc4440d761af47fd0c32661725011bf66ebb51 (patch) | |
tree | d2fdfe049eac9b45a9418bd1be103297b1c0c55e /fs/kernfs/dir.c | |
parent | fe198e34a44ce7f27e39c303d62a754129938194 (diff) | |
parent | ec6f34e5b552fb0a52e6aae1a5afbbb1605cc6cc (diff) |
Merge tag 'v3.19-rc5' into next
Linux 3.19-rc5
Conflicts:
drivers/usb/dwc2/gadget.c
drivers/usb/gadget/udc/bdc/bdc_ep.c
Diffstat (limited to 'fs/kernfs/dir.c')
-rw-r--r-- | fs/kernfs/dir.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c index 37989f02a226..2d881b381d2b 100644 --- a/fs/kernfs/dir.c +++ b/fs/kernfs/dir.c @@ -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); } |