Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

vfs: clarify and clean up dentry_cmp()

It did some odd things for unclear reasons. As this is one of the
functions that gets changed when doing word-at-a-time compares, this is
yet another of the "don't change any semantics, but clean things up so
that subsequent patches don't get obscured by the cleanups".

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

+4 -5
+4 -5
include/linux/dcache.h
··· 54 54 static inline int dentry_cmp(const unsigned char *cs, size_t scount, 55 55 const unsigned char *ct, size_t tcount) 56 56 { 57 - int ret; 58 57 if (scount != tcount) 59 58 return 1; 59 + 60 60 do { 61 - ret = (*cs != *ct); 62 - if (ret) 63 - break; 61 + if (*cs != *ct) 62 + return 1; 64 63 cs++; 65 64 ct++; 66 65 tcount--; 67 66 } while (tcount); 68 - return ret; 67 + return 0; 69 68 } 70 69 71 70 /* Name hashing routines. Initial hash value */