diff mbox series

f2fs: make "f2fs_fault_name[]" const char *

Message ID 20181124090642.GA10969@avx2 (mailing list archive)
State New, archived
Headers show
Series f2fs: make "f2fs_fault_name[]" const char * | expand

Commit Message

Alexey Dobriyan Nov. 24, 2018, 9:06 a.m. UTC
Those strings are immutable.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 fs/f2fs/f2fs.h  |    2 +-
 fs/f2fs/super.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Chao Yu Nov. 24, 2018, 10:25 a.m. UTC | #1
On 2018/11/24 17:06, Alexey Dobriyan wrote:
> Those strings are immutable.
> 
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>

Reviewed-by: Chao Yu <yuchao0@huawei.com>

Thanks,
diff mbox series

Patch

--- 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
 
--- 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",