Re: [PATCH] xfs: mark sb_fname as nonstring

2018-06-05 Thread Eric Sandeen
On 6/5/18 4:23 PM, Arnd Bergmann wrote: > On Tue, Jun 5, 2018 at 8:44 PM, Eric Sandeen wrote: >> On 5/25/18 10:14 AM, Arnd Bergmann wrote: > >>> diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c >>> index 84fbf164cbc3..eb79f2bc4dcc 100644 >>> --- a/fs/xfs/xfs_ioctl.c >>> +++ b/fs/xfs/xfs_io

Re: [PATCH] xfs: mark sb_fname as nonstring

2018-06-05 Thread Arnd Bergmann
On Tue, Jun 5, 2018 at 8:44 PM, Eric Sandeen wrote: > On 5/25/18 10:14 AM, Arnd Bergmann wrote: >> diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c >> index 84fbf164cbc3..eb79f2bc4dcc 100644 >> --- a/fs/xfs/xfs_ioctl.c >> +++ b/fs/xfs/xfs_ioctl.c >> @@ -1819,12 +1819,12 @@ xfs_ioc_getlabel( >

Re: [PATCH] xfs: mark sb_fname as nonstring

2018-06-05 Thread Eric Sandeen
On 5/25/18 10:14 AM, Arnd Bergmann wrote: > gcc-8 reports two warnings for the newly added getlabel/setlabel code: > > fs/xfs/xfs_ioctl.c: In function 'xfs_ioc_getlabel': > fs/xfs/xfs_ioctl.c:1822:38: error: argument to 'sizeof' in 'strncpy' call is > the same expression as the source; did you

Re: [PATCH] xfs: mark sb_fname as nonstring

2018-05-25 Thread Eric Sandeen
On 5/25/18 3:16 PM, Arnd Bergmann wrote: On Fri, May 25, 2018 at 6:53 PM, Eric Sandeen wrote: On 5/25/18 10:14 AM, Arnd Bergmann wrote: ... @@ -1860,7 +1860,7 @@ xfs_ioc_setlabel( spin_lock(&mp->m_sb_lock); memset(sbp->sb_fname, 0, sizeof(sbp->sb_fname)); - strncpy(s

Re: [PATCH] xfs: mark sb_fname as nonstring

2018-05-25 Thread Arnd Bergmann
On Fri, May 25, 2018 at 6:52 PM, Christoph Hellwig wrote: >> diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c >> index 84fbf164cbc3..eb79f2bc4dcc 100644 >> --- a/fs/xfs/xfs_ioctl.c >> +++ b/fs/xfs/xfs_ioctl.c >> @@ -1819,12 +1819,12 @@ xfs_ioc_getlabel( >> BUILD_BUG_ON(sizeof(sbp->sb_fna

Re: [PATCH] xfs: mark sb_fname as nonstring

2018-05-25 Thread Arnd Bergmann
On Fri, May 25, 2018 at 6:53 PM, Eric Sandeen wrote: > On 5/25/18 10:14 AM, Arnd Bergmann wrote: >> >> gcc-8 reports two warnings for the newly added getlabel/setlabel code: > > > Thanks for catching these. > > The patch summary confuses me, what does "mark sb_fname as nonstring" > mean in the con

Re: [PATCH] xfs: mark sb_fname as nonstring

2018-05-25 Thread Eric Sandeen
On 5/25/18 10:14 AM, Arnd Bergmann wrote: gcc-8 reports two warnings for the newly added getlabel/setlabel code: Thanks for catching these. The patch summary confuses me, what does "mark sb_fname as nonstring" mean in the context of the actual patch? I hate strings in C! ;) fs/xfs/xfs_ioct

Re: [PATCH] xfs: mark sb_fname as nonstring

2018-05-25 Thread Christoph Hellwig
> diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c > index 84fbf164cbc3..eb79f2bc4dcc 100644 > --- a/fs/xfs/xfs_ioctl.c > +++ b/fs/xfs/xfs_ioctl.c > @@ -1819,12 +1819,12 @@ xfs_ioc_getlabel( > BUILD_BUG_ON(sizeof(sbp->sb_fname) > FSLABEL_MAX); > > spin_lock(&mp->m_sb_lock); > -

[PATCH] xfs: mark sb_fname as nonstring

2018-05-25 Thread Arnd Bergmann
gcc-8 reports two warnings for the newly added getlabel/setlabel code: fs/xfs/xfs_ioctl.c: In function 'xfs_ioc_getlabel': fs/xfs/xfs_ioctl.c:1822:38: error: argument to 'sizeof' in 'strncpy' call is the same expression as the source; did you mean to use the size of the destination? [-Werror=siz