summaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/dir.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2010-01-31 21:03:58 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2010-03-03 14:07:58 -0500
commit072f98b4637eddcbdf2178fc84f382e2ee522f08 (patch)
treeee260375c1be79a1ba4f60f5211a18ba913b93e6 /fs/nilfs2/dir.c
parent0319003d0d229735770c185ddf132c666e9cd01a (diff)
downloadlinux-072f98b4637eddcbdf2178fc84f382e2ee522f08.tar.gz
linux-072f98b4637eddcbdf2178fc84f382e2ee522f08.tar.bz2
linux-072f98b4637eddcbdf2178fc84f382e2ee522f08.zip
nilfs: sanitize const/signedness in dealing with ->d_name.name
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/nilfs2/dir.c')
-rw-r--r--fs/nilfs2/dir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nilfs2/dir.c b/fs/nilfs2/dir.c
index 26402b9b305e..0092840492ee 100644
--- a/fs/nilfs2/dir.c
+++ b/fs/nilfs2/dir.c
@@ -224,7 +224,7 @@ fail:
* len <= NILFS_NAME_LEN and de != NULL are guaranteed by caller.
*/
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)
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)
{
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;
unsigned chunk_size = nilfs_chunk_size(dir);
unsigned reclen = NILFS_DIR_REC_LEN(namelen);