diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-04-26 09:15:29 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-05-29 00:41:34 +0200 |
commit | eaa693f4dcf1ca64b41b02d907e9c401c085cf59 (patch) | |
tree | 817b77d84ced4f1e539793d50ac7b2d02f6ab862 /fs/f2fs/hash.c | |
parent | f2fs: move get_page for gc victims (diff) | |
download | linux-eaa693f4dcf1ca64b41b02d907e9c401c085cf59.tar.xz linux-eaa693f4dcf1ca64b41b02d907e9c401c085cf59.zip |
f2fs: introduce dot and dotdot name check
This patch adds an inline function to check dot and dotdot names.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to '')
-rw-r--r-- | fs/f2fs/hash.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/f2fs/hash.c b/fs/f2fs/hash.c index a844fcfb9a8d..71b7206c431e 100644 --- a/fs/f2fs/hash.c +++ b/fs/f2fs/hash.c @@ -79,8 +79,7 @@ f2fs_hash_t f2fs_dentry_hash(const struct qstr *name_info) const unsigned char *name = name_info->name; size_t len = name_info->len; - if ((len <= 2) && (name[0] == '.') && - (name[1] == '.' || name[1] == '\0')) + if (is_dot_dotdot(name_info)) return 0; /* Initialize the default seed for the hash checksum functions */ |