Skip to content

Commit 072f98b

Browse files
author
Al Viro
committed
nilfs: sanitize const/signedness in dealing with ->d_name.name
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 0319003 commit 072f98b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎fs/nilfs2/dir.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ static struct page *nilfs_get_page(struct inode *dir, unsigned long n)
224224
* len <= NILFS_NAME_LEN and de != NULL are guaranteed by caller.
225225
*/
226226
static int
227-
nilfs_match(int len, const char * const name, struct nilfs_dir_entry *de)
227+
nilfs_match(int len, const unsigned char *name, struct nilfs_dir_entry *de)
228228
{
229229
if (len != de->name_len)
230230
return 0;
@@ -465,7 +465,7 @@ void nilfs_set_link(struct inode *dir, struct nilfs_dir_entry *de,
465465
int nilfs_add_link(struct dentry *dentry, struct inode *inode)
466466
{
467467
struct inode *dir = dentry->d_parent->d_inode;
468-
const char *name = dentry->d_name.name;
468+
const unsigned char *name = dentry->d_name.name;
469469
int namelen = dentry->d_name.len;
470470
unsigned chunk_size = nilfs_chunk_size(dir);
471471
unsigned reclen = NILFS_DIR_REC_LEN(namelen);

0 commit comments

Comments
 (0)