hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/fs/f2fs/hash.c
....@@ -12,7 +12,6 @@
1212 #include <linux/types.h>
1313 #include <linux/fs.h>
1414 #include <linux/f2fs_fs.h>
15
-#include <linux/cryptohash.h>
1615 #include <linux/pagemap.h>
1716 #include <linux/unicode.h>
1817
....@@ -92,7 +91,7 @@
9291 /*
9392 * Compute @fname->hash. For all directories, @fname->disk_name must be set.
9493 * For casefolded directories, @fname->usr_fname must be set, and also
95
- * @fname->cf_name if the filename is valid Unicode.
94
+ * @fname->cf_name if the filename is valid Unicode and is not "." or "..".
9695 */
9796 void f2fs_hash_filename(const struct inode *dir, struct f2fs_filename *fname)
9897 {
....@@ -111,10 +110,11 @@
111110 /*
112111 * If the casefolded name is provided, hash it instead of the
113112 * on-disk name. If the casefolded name is *not* provided, that
114
- * should only be because the name wasn't valid Unicode, so fall
115
- * back to treating the name as an opaque byte sequence. Note
116
- * that to handle encrypted directories, the fallback must use
117
- * usr_fname (plaintext) rather than disk_name (ciphertext).
113
+ * should only be because the name wasn't valid Unicode or was
114
+ * "." or "..", so fall back to treating the name as an opaque
115
+ * byte sequence. Note that to handle encrypted directories,
116
+ * the fallback must use usr_fname (plaintext) rather than
117
+ * disk_name (ciphertext).
118118 */
119119 WARN_ON_ONCE(!fname->usr_fname->name);
120120 if (fname->cf_name.name) {