[PATCH] staging: erofs: remove needless CONFIG_EROFS_FS_SECURITY

Yue Hu zbestahu at gmail.com
Thu Jun 20 19:25:52 AEST 2019


On Thu, 20 Jun 2019 16:32:01 +0800
Gao Xiang <gaoxiang25 at huawei.com> wrote:

> Hi Yue,
> 
> On 2019/6/20 16:30, Yue Hu wrote:
> > From: Yue Hu <huyue2 at yulong.com>
> > 
> > erofs_xattr_security_handler is already marked __maybe_unused, no need
> > to add CONFIG_EROFS_FS_SECURITY condition.
> > 
> > Signed-off-by: Yue Hu <huyue2 at yulong.com>
> > ---
> >  drivers/staging/erofs/xattr.c | 2 --
> >  1 file changed, 2 deletions(-)
> > 
> > diff --git a/drivers/staging/erofs/xattr.c b/drivers/staging/erofs/xattr.c
> > index df40654..06024ac 100644
> > --- a/drivers/staging/erofs/xattr.c
> > +++ b/drivers/staging/erofs/xattr.c
> > @@ -499,13 +499,11 @@ static int erofs_xattr_generic_get(const struct xattr_handler *handler,
> >  	.get	= erofs_xattr_generic_get,
> >  };
> >  
> > -#ifdef CONFIG_EROFS_FS_SECURITY
> >  const struct xattr_handler __maybe_unused erofs_xattr_security_handler = {
> >  	.prefix	= XATTR_SECURITY_PREFIX,
> >  	.flags	= EROFS_XATTR_INDEX_SECURITY,
> >  	.get	= erofs_xattr_generic_get,
> >  };
> > -#endif  
> 
> Thanks for your patch.
> 
> In that case...erofs_xattr_security_handler could be compiled into .rodata section?
> I am not sure...

Yes, just like erofs_xattr_user_handler as below in System.map.

ffffffff820ec2a0 R erofs_xattr_security_handler
ffffffff820ec2e0 R erofs_xattr_trusted_handler
ffffffff820ec320 R erofs_xattr_user_handler

Thx.

> 
> Thanks,
> Gao Xiang
> 
> >  
> >  const struct xattr_handler *erofs_xattr_handlers[] = {
> >  	&erofs_xattr_user_handler,
> >   



More information about the Linux-erofs mailing list