]> www.infradead.org Git - users/jedix/linux-maple.git/commit
vfs: link_path_walk: do '.' and '..' detection while hashing
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 16 Jun 2024 20:06:56 +0000 (13:06 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 19 Jun 2024 19:35:57 +0000 (12:35 -0700)
commitba848a77c90800cb686a5c8cf725e9bdfdcccfc2
tree6c196ff73b114e4b57d0fd95c7d3c3eca36e862d
parent631e1a710c0489e083d4f1276f6de787a5cf08fb
vfs: link_path_walk: do '.' and '..' detection while hashing

Instead of loading the name again to detect '.' and '..', just use the
fact that we already had the masked last word available when as we
created the name hash.  Which is exactly what we'd then test for.

Dealing with big-endian word ordering needs a bit of care, particularly
since we have the byte-at-a-time loop as a fallback that doesn't do BE
word loads.  But not a big deal.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/namei.c