Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751511AbdHaK5N (ORCPT ); Thu, 31 Aug 2017 06:57:13 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:5064 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751382AbdHaK5K (ORCPT ); Thu, 31 Aug 2017 06:57:10 -0400 Subject: Re: [PATCH] f2fs: constify super_operations To: Arvind Yadav , CC: , References: <668bb6351adb54694cee5e94f213f5f4c63f96bd.1504171894.git.arvind.yadav.cs@gmail.com> From: Chao Yu Message-ID: Date: Thu, 31 Aug 2017 18:56:48 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <668bb6351adb54694cee5e94f213f5f4c63f96bd.1504171894.git.arvind.yadav.cs@gmail.com> Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.134.22.195] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090205.59A7EB77.0146,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 173787e44aeb783e1d0c0ab14d65e447 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 897 Lines: 28 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 work with const super_operations. So mark > the non-const structs as const > > Signed-off-by: Arvind Yadav Reviewed-by: Chao Yu > --- > 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, >