All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ramfs: fix mount source show for ramfs
@ 2021-08-11 12:28 yangerkun
  2021-09-08  8:56 ` yangerkun
  2021-09-24  4:35 ` Al Viro
  0 siblings, 2 replies; 9+ messages in thread
From: yangerkun @ 2021-08-11 12:28 UTC (permalink / raw)
  To: akpm; +Cc: jack, viro, gregkh, linux-fsdevel, linux-mm, yangerkun, yukuai3

ramfs_parse_param does not parse key "source", and will convert
-ENOPARAM to 0. This will skip vfs_parse_fs_param_source in
vfs_parse_fs_param, which lead always "none" mount source for ramfs. Fix
it by parse "source" in ramfs_parse_param.

Signed-off-by: yangerkun <yangerkun@huawei.com>
---
 fs/ramfs/inode.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/fs/ramfs/inode.c b/fs/ramfs/inode.c
index 65e7e56005b8..0d7f5f655fd8 100644
--- a/fs/ramfs/inode.c
+++ b/fs/ramfs/inode.c
@@ -202,6 +202,10 @@ static int ramfs_parse_param(struct fs_context *fc, struct fs_parameter *param)
 	struct ramfs_fs_info *fsi = fc->s_fs_info;
 	int opt;
 
+	opt = vfs_parse_fs_param_source(fc, param);
+	if (opt != -ENOPARAM)
+		return opt;
+
 	opt = fs_parse(fc, ramfs_fs_parameters, param, &result);
 	if (opt < 0) {
 		/*
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] ramfs: fix mount source show for ramfs
  2021-08-11 12:28 [PATCH] ramfs: fix mount source show for ramfs yangerkun
@ 2021-09-08  8:56 ` yangerkun
  2021-09-08 22:39   ` Andrew Morton
  2021-09-24  4:35 ` Al Viro
  1 sibling, 1 reply; 9+ messages in thread
From: yangerkun @ 2021-09-08  8:56 UTC (permalink / raw)
  To: akpm, sfr; +Cc: jack, viro, gregkh, linux-fsdevel, linux-mm, yukuai3

Hi, this patch seems still leave in linux-next, should we pull it to
mainline?

在 2021/8/11 20:28, yangerkun 写道:
> ramfs_parse_param does not parse key "source", and will convert
> -ENOPARAM to 0. This will skip vfs_parse_fs_param_source in
> vfs_parse_fs_param, which lead always "none" mount source for ramfs. Fix
> it by parse "source" in ramfs_parse_param.
> 
> Signed-off-by: yangerkun <yangerkun@huawei.com>
> ---
>   fs/ramfs/inode.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/fs/ramfs/inode.c b/fs/ramfs/inode.c
> index 65e7e56005b8..0d7f5f655fd8 100644
> --- a/fs/ramfs/inode.c
> +++ b/fs/ramfs/inode.c
> @@ -202,6 +202,10 @@ static int ramfs_parse_param(struct fs_context *fc, struct fs_parameter *param)
>   	struct ramfs_fs_info *fsi = fc->s_fs_info;
>   	int opt;
>   
> +	opt = vfs_parse_fs_param_source(fc, param);
> +	if (opt != -ENOPARAM)
> +		return opt;
> +
>   	opt = fs_parse(fc, ramfs_fs_parameters, param, &result);
>   	if (opt < 0) {
>   		/*
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] ramfs: fix mount source show for ramfs
  2021-09-08  8:56 ` yangerkun
@ 2021-09-08 22:39   ` Andrew Morton
  2021-09-09  8:37     ` yangerkun
  0 siblings, 1 reply; 9+ messages in thread
From: Andrew Morton @ 2021-09-08 22:39 UTC (permalink / raw)
  To: yangerkun; +Cc: sfr, jack, viro, gregkh, linux-fsdevel, linux-mm, yukuai3

On Wed, 8 Sep 2021 16:56:25 +0800 yangerkun <yangerkun@huawei.com> wrote:

> 在 2021/8/11 20:28, yangerkun 写道:
> > ramfs_parse_param does not parse key "source", and will convert
> > -ENOPARAM to 0. This will skip vfs_parse_fs_param_source in
> > vfs_parse_fs_param, which lead always "none" mount source for ramfs. Fix
> > it by parse "source" in ramfs_parse_param.
> > 
> > Signed-off-by: yangerkun <yangerkun@huawei.com>
> > ---
> >   fs/ramfs/inode.c | 4 ++++
> >   1 file changed, 4 insertions(+)
> > 
> > diff --git a/fs/ramfs/inode.c b/fs/ramfs/inode.c
> > index 65e7e56005b8..0d7f5f655fd8 100644
> > --- a/fs/ramfs/inode.c
> > +++ b/fs/ramfs/inode.c
> > @@ -202,6 +202,10 @@ static int ramfs_parse_param(struct fs_context *fc, struct fs_parameter *param)
> >   	struct ramfs_fs_info *fsi = fc->s_fs_info;
> >   	int opt;
> >   
> > +	opt = vfs_parse_fs_param_source(fc, param);
> > +	if (opt != -ENOPARAM)
> > +		return opt;
> > +
> >   	opt = fs_parse(fc, ramfs_fs_parameters, param, &result);
> >   	if (opt < 0) {
> >   		/*
> > 

(top-posting repaired)

> Hi, this patch seems still leave in linux-next, should we pull it to
> mainline?

I was hoping for a comment from Al?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] ramfs: fix mount source show for ramfs
  2021-09-08 22:39   ` Andrew Morton
@ 2021-09-09  8:37     ` yangerkun
  2021-09-13  1:10       ` yangerkun
  0 siblings, 1 reply; 9+ messages in thread
From: yangerkun @ 2021-09-09  8:37 UTC (permalink / raw)
  To: Andrew Morton; +Cc: sfr, jack, viro, gregkh, linux-fsdevel, linux-mm, yukuai3



在 2021/9/9 6:39, Andrew Morton 写道:
> On Wed, 8 Sep 2021 16:56:25 +0800 yangerkun <yangerkun@huawei.com> wrote:
> 
>> 在 2021/8/11 20:28, yangerkun 写道:
>>> ramfs_parse_param does not parse key "source", and will convert
>>> -ENOPARAM to 0. This will skip vfs_parse_fs_param_source in
>>> vfs_parse_fs_param, which lead always "none" mount source for ramfs. Fix
>>> it by parse "source" in ramfs_parse_param.
>>>
>>> Signed-off-by: yangerkun <yangerkun@huawei.com>
>>> ---
>>>    fs/ramfs/inode.c | 4 ++++
>>>    1 file changed, 4 insertions(+)
>>>
>>> diff --git a/fs/ramfs/inode.c b/fs/ramfs/inode.c
>>> index 65e7e56005b8..0d7f5f655fd8 100644
>>> --- a/fs/ramfs/inode.c
>>> +++ b/fs/ramfs/inode.c
>>> @@ -202,6 +202,10 @@ static int ramfs_parse_param(struct fs_context *fc, struct fs_parameter *param)
>>>    	struct ramfs_fs_info *fsi = fc->s_fs_info;
>>>    	int opt;
>>>    
>>> +	opt = vfs_parse_fs_param_source(fc, param);
>>> +	if (opt != -ENOPARAM)
>>> +		return opt;
>>> +
>>>    	opt = fs_parse(fc, ramfs_fs_parameters, param, &result);
>>>    	if (opt < 0) {
>>>    		/*
>>>
> 
> (top-posting repaired)
> 
>> Hi, this patch seems still leave in linux-next, should we pull it to
>> mainline?
> 
> I was hoping for a comment from Al?

Hi, Al,

Can you help to review this patch...

Thanks,
Kun.

> .
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] ramfs: fix mount source show for ramfs
  2021-09-09  8:37     ` yangerkun
@ 2021-09-13  1:10       ` yangerkun
  2021-09-18  7:08         ` yangerkun
  0 siblings, 1 reply; 9+ messages in thread
From: yangerkun @ 2021-09-13  1:10 UTC (permalink / raw)
  To: Andrew Morton, Al Viro
  Cc: sfr, jack, viro, gregkh, linux-fsdevel, linux-mm, yukuai3



在 2021/9/9 16:37, yangerkun 写道:
> 
> 
> 在 2021/9/9 6:39, Andrew Morton 写道:
>> On Wed, 8 Sep 2021 16:56:25 +0800 yangerkun <yangerkun@huawei.com> wrote:
>>
>>> 在 2021/8/11 20:28, yangerkun 写道:
>>>> ramfs_parse_param does not parse key "source", and will convert
>>>> -ENOPARAM to 0. This will skip vfs_parse_fs_param_source in
>>>> vfs_parse_fs_param, which lead always "none" mount source for ramfs. 
>>>> Fix
>>>> it by parse "source" in ramfs_parse_param.
>>>>
>>>> Signed-off-by: yangerkun <yangerkun@huawei.com>
>>>> ---
>>>>    fs/ramfs/inode.c | 4 ++++
>>>>    1 file changed, 4 insertions(+)
>>>>
>>>> diff --git a/fs/ramfs/inode.c b/fs/ramfs/inode.c
>>>> index 65e7e56005b8..0d7f5f655fd8 100644
>>>> --- a/fs/ramfs/inode.c
>>>> +++ b/fs/ramfs/inode.c
>>>> @@ -202,6 +202,10 @@ static int ramfs_parse_param(struct fs_context 
>>>> *fc, struct fs_parameter *param)
>>>>        struct ramfs_fs_info *fsi = fc->s_fs_info;
>>>>        int opt;
>>>> +    opt = vfs_parse_fs_param_source(fc, param);
>>>> +    if (opt != -ENOPARAM)
>>>> +        return opt;
>>>> +
>>>>        opt = fs_parse(fc, ramfs_fs_parameters, param, &result);
>>>>        if (opt < 0) {
>>>>            /*
>>>>
>>
>> (top-posting repaired)
>>
>>> Hi, this patch seems still leave in linux-next, should we pull it to
>>> mainline?
>>
>> I was hoping for a comment from Al?
> 
> Hi, Al,
> 
> Can you help to review this patch...

Hi, Al,

Sorry for the noise again, can you help to give some comments for this 
patch.

> 
> Thanks,
> Kun.
> 
>> .
>>
> .

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] ramfs: fix mount source show for ramfs
  2021-09-13  1:10       ` yangerkun
@ 2021-09-18  7:08         ` yangerkun
  2021-09-23  6:07           ` yangerkun
  0 siblings, 1 reply; 9+ messages in thread
From: yangerkun @ 2021-09-18  7:08 UTC (permalink / raw)
  To: Andrew Morton, Al Viro
  Cc: sfr, jack, gregkh, linux-fsdevel, linux-mm, yukuai3

Ping...

在 2021/9/13 9:10, yangerkun 写道:
> 
> 
> 在 2021/9/9 16:37, yangerkun 写道:
>>
>>
>> 在 2021/9/9 6:39, Andrew Morton 写道:
>>> On Wed, 8 Sep 2021 16:56:25 +0800 yangerkun <yangerkun@huawei.com> 
>>> wrote:
>>>
>>>> 在 2021/8/11 20:28, yangerkun 写道:
>>>>> ramfs_parse_param does not parse key "source", and will convert
>>>>> -ENOPARAM to 0. This will skip vfs_parse_fs_param_source in
>>>>> vfs_parse_fs_param, which lead always "none" mount source for 
>>>>> ramfs. Fix
>>>>> it by parse "source" in ramfs_parse_param.
>>>>>
>>>>> Signed-off-by: yangerkun <yangerkun@huawei.com>
>>>>> ---
>>>>>    fs/ramfs/inode.c | 4 ++++
>>>>>    1 file changed, 4 insertions(+)
>>>>>
>>>>> diff --git a/fs/ramfs/inode.c b/fs/ramfs/inode.c
>>>>> index 65e7e56005b8..0d7f5f655fd8 100644
>>>>> --- a/fs/ramfs/inode.c
>>>>> +++ b/fs/ramfs/inode.c
>>>>> @@ -202,6 +202,10 @@ static int ramfs_parse_param(struct fs_context 
>>>>> *fc, struct fs_parameter *param)
>>>>>        struct ramfs_fs_info *fsi = fc->s_fs_info;
>>>>>        int opt;
>>>>> +    opt = vfs_parse_fs_param_source(fc, param);
>>>>> +    if (opt != -ENOPARAM)
>>>>> +        return opt;
>>>>> +
>>>>>        opt = fs_parse(fc, ramfs_fs_parameters, param, &result);
>>>>>        if (opt < 0) {
>>>>>            /*
>>>>>
>>>
>>> (top-posting repaired)
>>>
>>>> Hi, this patch seems still leave in linux-next, should we pull it to
>>>> mainline?
>>>
>>> I was hoping for a comment from Al?
>>
>> Hi, Al,
>>
>> Can you help to review this patch...
> 
> Hi, Al,
> 
> Sorry for the noise again, can you help to give some comments for this 
> patch.
> 
>>
>> Thanks,
>> Kun.
>>
>>> .
>>>
>> .
> .

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] ramfs: fix mount source show for ramfs
  2021-09-18  7:08         ` yangerkun
@ 2021-09-23  6:07           ` yangerkun
  0 siblings, 0 replies; 9+ messages in thread
From: yangerkun @ 2021-09-23  6:07 UTC (permalink / raw)
  To: Andrew Morton, Al Viro
  Cc: sfr, jack, gregkh, linux-fsdevel, linux-mm, yukuai3

Ping again...

在 2021/9/18 15:08, yangerkun 写道:
> Ping...
> 
> 在 2021/9/13 9:10, yangerkun 写道:
>>
>>
>> 在 2021/9/9 16:37, yangerkun 写道:
>>>
>>>
>>> 在 2021/9/9 6:39, Andrew Morton 写道:
>>>> On Wed, 8 Sep 2021 16:56:25 +0800 yangerkun <yangerkun@huawei.com> 
>>>> wrote:
>>>>
>>>>> 在 2021/8/11 20:28, yangerkun 写道:
>>>>>> ramfs_parse_param does not parse key "source", and will convert
>>>>>> -ENOPARAM to 0. This will skip vfs_parse_fs_param_source in
>>>>>> vfs_parse_fs_param, which lead always "none" mount source for 
>>>>>> ramfs. Fix
>>>>>> it by parse "source" in ramfs_parse_param.
>>>>>>
>>>>>> Signed-off-by: yangerkun <yangerkun@huawei.com>
>>>>>> ---
>>>>>>    fs/ramfs/inode.c | 4 ++++
>>>>>>    1 file changed, 4 insertions(+)
>>>>>>
>>>>>> diff --git a/fs/ramfs/inode.c b/fs/ramfs/inode.c
>>>>>> index 65e7e56005b8..0d7f5f655fd8 100644
>>>>>> --- a/fs/ramfs/inode.c
>>>>>> +++ b/fs/ramfs/inode.c
>>>>>> @@ -202,6 +202,10 @@ static int ramfs_parse_param(struct 
>>>>>> fs_context *fc, struct fs_parameter *param)
>>>>>>        struct ramfs_fs_info *fsi = fc->s_fs_info;
>>>>>>        int opt;
>>>>>> +    opt = vfs_parse_fs_param_source(fc, param);
>>>>>> +    if (opt != -ENOPARAM)
>>>>>> +        return opt;
>>>>>> +
>>>>>>        opt = fs_parse(fc, ramfs_fs_parameters, param, &result);
>>>>>>        if (opt < 0) {
>>>>>>            /*
>>>>>>
>>>>
>>>> (top-posting repaired)
>>>>
>>>>> Hi, this patch seems still leave in linux-next, should we pull it to
>>>>> mainline?
>>>>
>>>> I was hoping for a comment from Al?
>>>
>>> Hi, Al,
>>>
>>> Can you help to review this patch...
>>
>> Hi, Al,
>>
>> Sorry for the noise again, can you help to give some comments for this 
>> patch.
>>
>>>
>>> Thanks,
>>> Kun.
>>>
>>>> .
>>>>
>>> .
>> .
> .

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] ramfs: fix mount source show for ramfs
  2021-08-11 12:28 [PATCH] ramfs: fix mount source show for ramfs yangerkun
  2021-09-08  8:56 ` yangerkun
@ 2021-09-24  4:35 ` Al Viro
  2021-09-24  7:53   ` yangerkun
  1 sibling, 1 reply; 9+ messages in thread
From: Al Viro @ 2021-09-24  4:35 UTC (permalink / raw)
  To: yangerkun; +Cc: akpm, jack, gregkh, linux-fsdevel, linux-mm, yukuai3

On Wed, Aug 11, 2021 at 08:28:11PM +0800, yangerkun wrote:
> ramfs_parse_param does not parse key "source", and will convert
> -ENOPARAM to 0. This will skip vfs_parse_fs_param_source in
> vfs_parse_fs_param, which lead always "none" mount source for ramfs. Fix
> it by parse "source" in ramfs_parse_param.
> 
> Signed-off-by: yangerkun <yangerkun@huawei.com>
> ---
>  fs/ramfs/inode.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/fs/ramfs/inode.c b/fs/ramfs/inode.c
> index 65e7e56005b8..0d7f5f655fd8 100644
> --- a/fs/ramfs/inode.c
> +++ b/fs/ramfs/inode.c
> @@ -202,6 +202,10 @@ static int ramfs_parse_param(struct fs_context *fc, struct fs_parameter *param)
>  	struct ramfs_fs_info *fsi = fc->s_fs_info;
>  	int opt;
>  
> +	opt = vfs_parse_fs_param_source(fc, param);
> +	if (opt != -ENOPARAM)
> +		return opt;
> +
>  	opt = fs_parse(fc, ramfs_fs_parameters, param, &result);
>  	if (opt < 0) {
>  		/*

	Umm...  If anything, I would rather call that thing *after*
fs_parse() gives negative, similar to what kernel/cgroup/cgroup-v1.c
does.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] ramfs: fix mount source show for ramfs
  2021-09-24  4:35 ` Al Viro
@ 2021-09-24  7:53   ` yangerkun
  0 siblings, 0 replies; 9+ messages in thread
From: yangerkun @ 2021-09-24  7:53 UTC (permalink / raw)
  To: Al Viro; +Cc: akpm, jack, gregkh, linux-fsdevel, linux-mm, yukuai3



在 2021/9/24 12:35, Al Viro 写道:
> On Wed, Aug 11, 2021 at 08:28:11PM +0800, yangerkun wrote:
>> ramfs_parse_param does not parse key "source", and will convert
>> -ENOPARAM to 0. This will skip vfs_parse_fs_param_source in
>> vfs_parse_fs_param, which lead always "none" mount source for ramfs. Fix
>> it by parse "source" in ramfs_parse_param.
>>
>> Signed-off-by: yangerkun <yangerkun@huawei.com>
>> ---
>>   fs/ramfs/inode.c | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/fs/ramfs/inode.c b/fs/ramfs/inode.c
>> index 65e7e56005b8..0d7f5f655fd8 100644
>> --- a/fs/ramfs/inode.c
>> +++ b/fs/ramfs/inode.c
>> @@ -202,6 +202,10 @@ static int ramfs_parse_param(struct fs_context *fc, struct fs_parameter *param)
>>   	struct ramfs_fs_info *fsi = fc->s_fs_info;
>>   	int opt;
>>   
>> +	opt = vfs_parse_fs_param_source(fc, param);
>> +	if (opt != -ENOPARAM)
>> +		return opt;
>> +
>>   	opt = fs_parse(fc, ramfs_fs_parameters, param, &result);
>>   	if (opt < 0) {
>>   		/*
> 
> 	Umm...  If anything, I would rather call that thing *after*
> fs_parse() gives negative, similar to what kernel/cgroup/cgroup-v1.c
> does.

Thanks for your advise. Will do it next version.

> .
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-09-24  7:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-11 12:28 [PATCH] ramfs: fix mount source show for ramfs yangerkun
2021-09-08  8:56 ` yangerkun
2021-09-08 22:39   ` Andrew Morton
2021-09-09  8:37     ` yangerkun
2021-09-13  1:10       ` yangerkun
2021-09-18  7:08         ` yangerkun
2021-09-23  6:07           ` yangerkun
2021-09-24  4:35 ` Al Viro
2021-09-24  7:53   ` yangerkun

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.