mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
fs: constify tree_descr arrays passed to simple_fill_super()
simple_fill_super() is passed an array of tree_descr structures which describe the files to create in the filesystem's root directory. Since these arrays are never modified intentionally, they should be 'const' so that they are placed in .rodata and benefit from memory protection. This patch updates the function signature and all users, and also constifies tree_descr.name. Signed-off-by: Eric Biggers <[email protected]> Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
a0c111b49b
commit
cda37124f4
13 changed files with 17 additions and 16 deletions
|
|
@ -1146,7 +1146,7 @@ static ssize_t write_v4_end_grace(struct file *file, char *buf, size_t size)
|
|||
|
||||
static int nfsd_fill_super(struct super_block * sb, void * data, int silent)
|
||||
{
|
||||
static struct tree_descr nfsd_files[] = {
|
||||
static const struct tree_descr nfsd_files[] = {
|
||||
[NFSD_List] = {"exports", &exports_nfsd_operations, S_IRUGO},
|
||||
[NFSD_Export_features] = {"export_features",
|
||||
&export_features_operations, S_IRUGO},
|
||||
|
|
|
|||
Loading…
Reference in a new issue