lkml.org 
[lkml]   [2017]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] f2fs: constify super_operations
From
Date
On 2017/8/31 17:36, Arvind Yadav wrote:
> super_operations are not supposed to change at runtime.
> "struct super_block" working with super_operations provided
> by <linux/fs.h> work with const super_operations. So mark
> the non-const structs as const
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>

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

> ---
> fs/f2fs/super.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
> index 32e4c02..2bf0869 100644
> --- a/fs/f2fs/super.c
> +++ b/fs/f2fs/super.c
> @@ -1199,7 +1199,7 @@ static inline void f2fs_quota_off_umount(struct super_block *sb)
> }
> #endif
>
> -static struct super_operations f2fs_sops = {
> +static const struct super_operations f2fs_sops = {
> .alloc_inode = f2fs_alloc_inode,
> .drop_inode = f2fs_drop_inode,
> .destroy_inode = f2fs_destroy_inode,
>

\
 
 \ /
  Last update: 2017-08-31 12:57    [W:0.039 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site