From: Alexey Dobriyan Date: Sat, 24 Nov 2018 09:06:42 +0000 (+0300) Subject: f2fs: make "f2fs_fault_name[]" const char * X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=19880e6e5ff3b3574f510cd65b6677998ff08336;p=linux.git f2fs: make "f2fs_fault_name[]" const char * Those strings are immutable. Signed-off-by: Alexey Dobriyan Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index b3fe6803d4c61..c28a9d1cb2781 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -67,7 +67,7 @@ struct f2fs_fault_info { unsigned int inject_type; }; -extern char *f2fs_fault_name[FAULT_MAX]; +extern const char *f2fs_fault_name[FAULT_MAX]; #define IS_FAULT_SET(fi, type) ((fi)->inject_type & (1 << (type))) #endif diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 12a7cb0eaa737..e184ad4e4e900 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -38,7 +38,7 @@ static struct kmem_cache *f2fs_inode_cachep; #ifdef CONFIG_F2FS_FAULT_INJECTION -char *f2fs_fault_name[FAULT_MAX] = { +const char *f2fs_fault_name[FAULT_MAX] = { [FAULT_KMALLOC] = "kmalloc", [FAULT_KVMALLOC] = "kvmalloc", [FAULT_PAGE_ALLOC] = "page alloc",