Re: [PATCH 1/1 linux-next] exofs: convert simple_str to kstr

From: Fabian Frederick
Date: Thu Apr 30 2015 - 14:47:47 EST




> On 30 April 2015 at 09:55 Boaz Harrosh <ooo@xxxxxxxxxxxxxxx> wrote:
>
>
> On 04/29/2015 08:58 PM, Fabian Frederick wrote:
> > replace obsolete function.
> >
> > Signed-off-by: Fabian Frederick <fabf@xxxxxxxxx>
>
> Thanks.
> ACK-by: Boaz Harrosh <ooo@xxxxxxxxxxxxxxx>
>
> Are you pushing all these through some tree, or
> You need that I push it? Maybe push all these changes
> through some central place, like Andrew's tree?

Thanks Boaz, I don't use any tree ; I could forward this patch to Andrew but I
guess you
prefer Alexey's solution which uses parse_integer() instead of
match_strlcpy() ?

http://marc.info/?l=linux-kernel&m=143039354303440&w=2

Regards,
Fabian

>
> Boaz
>
> > ---
> > This is untested.
> >
> >Â fs/exofs/super.c | 8 +++++++-
> >Â 1 file changed, 7 insertions(+), 1 deletion(-)
> >
> > diff --git a/fs/exofs/super.c b/fs/exofs/super.c
> > index b795c56..b667f73 100644
> > --- a/fs/exofs/super.c
> > +++ b/fs/exofs/super.c
> > @@ -108,9 +108,14 @@ static int parse_options(char *options, struct
> > exofs_mountopt *opts)
> >Â Â Â Â Â Â Â Â Â Â Âopts->is_osdname = true;
> >Â Â Â Â Â Â Â Â Â Â Âbreak;
> >Â Â Â Â Â Â Âcase Opt_pid:
> > +Â Â Â Â Â Â{
> > +Â Â Â Â Â Â Â Â Â Âint rc;
> > +
> >Â Â Â Â Â Â Â Â Â Â Âif (0 == match_strlcpy(str, &args[0], sizeof(str)))
> >Â Â Â Â Â Â Â Â Â Â Â Â Â Â Âreturn -EINVAL;
> > -Â Â Â Â Â Â Â Â Â Âopts->pid = simple_strtoull(str, NULL, 0);
> > +Â Â Â Â Â Â Â Â Â Ârc = kstrtoull(str, 0, &opts->pid);
> > +Â Â Â Â Â Â Â Â Â Âif (rc)
> > +Â Â Â Â Â Â Â Â Â Â Â Â Â Âreturn rc;
> >Â Â Â Â Â Â Â Â Â Â Âif (opts->pid < EXOFS_MIN_PID) {
> >Â Â Â Â Â Â Â Â Â Â Â Â Â Â ÂEXOFS_ERR("Partition ID must be >= %u",
> >Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â ÂEXOFS_MIN_PID);
> > @@ -118,6 +123,7 @@ static int parse_options(char *options, struct
> > exofs_mountopt *opts)
> >Â Â Â Â Â Â Â Â Â Â Â}
> >Â Â Â Â Â Â Â Â Â Â Âs_pid = 1;
> >Â Â Â Â Â Â Â Â Â Â Âbreak;
> > +Â Â Â Â Â Â}
> >Â Â Â Â Â Â Âcase Opt_to:
> >Â Â Â Â Â Â Â Â Â Â Âif (match_int(&args[0], &option))
> >Â Â Â Â Â Â Â Â Â Â Â Â Â Â Âreturn -EINVAL;
> >
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/