* [ext4:unicode 8/10] fs/ext4/hash.c:286 ext4fs_dirhash() warn: returning -1 instead of -ENOMEM is sloppy
@ 2019-04-08 6:34 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2019-04-08 6:34 UTC (permalink / raw)
To: kbuild, Gabriel Krisman Bertazi; +Cc: kbuild-all, linux-ext4, Theodore Ts'o
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git unicode
head: c0ae3a05c89c497446d6e208b68623993b5afc3c
commit: 6ca9bcdef8a4bc83fe8499ab47e29b849ea94bfb [8/10] ext4: support encoding-aware file name lookups
smatch warnings:
fs/ext4/hash.c:286 ext4fs_dirhash() warn: returning -1 instead of -ENOMEM is sloppy
# https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git/commit/?id=6ca9bcdef8a4bc83fe8499ab47e29b849ea94bfb
git remote add ext4 https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git
git remote update ext4
git checkout 6ca9bcdef8a4bc83fe8499ab47e29b849ea94bfb
vim +286 fs/ext4/hash.c
6ca9bcdef Gabriel Krisman Bertazi 2019-03-18 273
6ca9bcdef Gabriel Krisman Bertazi 2019-03-18 274 int ext4fs_dirhash(const struct inode *dir, const char *name, int len,
6ca9bcdef Gabriel Krisman Bertazi 2019-03-18 275 struct dx_hash_info *hinfo)
6ca9bcdef Gabriel Krisman Bertazi 2019-03-18 276 {
6ca9bcdef Gabriel Krisman Bertazi 2019-03-18 277 #ifdef CONFIG_UNICODE
6ca9bcdef Gabriel Krisman Bertazi 2019-03-18 278 const struct unicode_map *um = EXT4_SB(dir->i_sb)->s_encoding;
6ca9bcdef Gabriel Krisman Bertazi 2019-03-18 279 int r, dlen;
6ca9bcdef Gabriel Krisman Bertazi 2019-03-18 280 unsigned char *buff;
6ca9bcdef Gabriel Krisman Bertazi 2019-03-18 281 struct qstr qstr = {.name = name, .len = len };
6ca9bcdef Gabriel Krisman Bertazi 2019-03-18 282
6ca9bcdef Gabriel Krisman Bertazi 2019-03-18 283 if (len && um) {
6ca9bcdef Gabriel Krisman Bertazi 2019-03-18 284 buff = kzalloc(sizeof(char) * PATH_MAX, GFP_KERNEL);
6ca9bcdef Gabriel Krisman Bertazi 2019-03-18 285 if (!buff)
6ca9bcdef Gabriel Krisman Bertazi 2019-03-18 @286 return -1;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-04-08 6:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-08 6:34 [ext4:unicode 8/10] fs/ext4/hash.c:286 ext4fs_dirhash() warn: returning -1 instead of -ENOMEM is sloppy Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).