f2fs: make "f2fs_fault_name[]" const char *
Those strings are immutable. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
committed by
Jaegeuk Kim
parent
0ea295dd85
commit
19880e6e5f
@@ -67,7 +67,7 @@ struct f2fs_fault_info {
|
|||||||
unsigned int inject_type;
|
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)))
|
#define IS_FAULT_SET(fi, type) ((fi)->inject_type & (1 << (type)))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ static struct kmem_cache *f2fs_inode_cachep;
|
|||||||
|
|
||||||
#ifdef CONFIG_F2FS_FAULT_INJECTION
|
#ifdef CONFIG_F2FS_FAULT_INJECTION
|
||||||
|
|
||||||
char *f2fs_fault_name[FAULT_MAX] = {
|
const char *f2fs_fault_name[FAULT_MAX] = {
|
||||||
[FAULT_KMALLOC] = "kmalloc",
|
[FAULT_KMALLOC] = "kmalloc",
|
||||||
[FAULT_KVMALLOC] = "kvmalloc",
|
[FAULT_KVMALLOC] = "kvmalloc",
|
||||||
[FAULT_PAGE_ALLOC] = "page alloc",
|
[FAULT_PAGE_ALLOC] = "page alloc",
|
||||||
|
|||||||
Reference in New Issue
Block a user