Message ID | 20171127213423.27218-15-andi@firstfloor.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 2995a271ec46..2f02f1c991c9 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -2821,12 +2821,12 @@ enum kernel_read_file_id { __kernel_read_file_id(__fid_enumify) }; -static const char * const kernel_read_file_str[] = { - __kernel_read_file_id(__fid_stringify) -}; - static inline const char *kernel_read_file_id_str(enum kernel_read_file_id id) { + static const char * const kernel_read_file_str[] = { + __kernel_read_file_id(__fid_stringify) + }; + if ((unsigned)id >= READING_MAX_ID) return kernel_read_file_str[READING_UNKNOWN];