mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-02-22 07:00:08 +07:00
nilfs: sanitize const/signedness in dealing with ->d_name.name
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
0319003d0d
commit
072f98b463
@ -224,7 +224,7 @@ static struct page *nilfs_get_page(struct inode *dir, unsigned long n)
|
|||||||
* len <= NILFS_NAME_LEN and de != NULL are guaranteed by caller.
|
* len <= NILFS_NAME_LEN and de != NULL are guaranteed by caller.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
nilfs_match(int len, const char * const name, struct nilfs_dir_entry *de)
|
nilfs_match(int len, const unsigned char *name, struct nilfs_dir_entry *de)
|
||||||
{
|
{
|
||||||
if (len != de->name_len)
|
if (len != de->name_len)
|
||||||
return 0;
|
return 0;
|
||||||
@ -465,7 +465,7 @@ void nilfs_set_link(struct inode *dir, struct nilfs_dir_entry *de,
|
|||||||
int nilfs_add_link(struct dentry *dentry, struct inode *inode)
|
int nilfs_add_link(struct dentry *dentry, struct inode *inode)
|
||||||
{
|
{
|
||||||
struct inode *dir = dentry->d_parent->d_inode;
|
struct inode *dir = dentry->d_parent->d_inode;
|
||||||
const char *name = dentry->d_name.name;
|
const unsigned char *name = dentry->d_name.name;
|
||||||
int namelen = dentry->d_name.len;
|
int namelen = dentry->d_name.len;
|
||||||
unsigned chunk_size = nilfs_chunk_size(dir);
|
unsigned chunk_size = nilfs_chunk_size(dir);
|
||||||
unsigned reclen = NILFS_DIR_REC_LEN(namelen);
|
unsigned reclen = NILFS_DIR_REC_LEN(namelen);
|
||||||
|
Loading…
Reference in New Issue
Block a user