* + ramfs-fix-mount-source-show-for-ramfs.patch added to -mm tree
@ 2021-08-12 21:50 akpm
0 siblings, 0 replies; 3+ messages in thread
From: akpm @ 2021-08-12 21:50 UTC (permalink / raw)
To: mm-commits, yukuai3, viro, jack, gregkh, yangerkun
The patch titled
Subject: ramfs: fix mount source show for ramfs
has been added to the -mm tree. Its filename is
ramfs-fix-mount-source-show-for-ramfs.patch
This patch should soon appear at
https://ozlabs.org/~akpm/mmots/broken-out/ramfs-fix-mount-source-show-for-ramfs.patch
and later at
https://ozlabs.org/~akpm/mmotm/broken-out/ramfs-fix-mount-source-show-for-ramfs.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: yangerkun <yangerkun@huawei.com>
Subject: ramfs: fix mount source show for ramfs
ramfs_parse_param does not parse the key "source", and will convert
-ENOPARAM to 0. This will skip calling vfs_parse_fs_param_source() in
vfs_parse_fs_param(), which leads to always presenting "none" as the mount
source for ramfs. Fix it by parsing "source" in ramfs_parse_param().
Link: https://lkml.kernel.org/r/20210811122811.2288041-1-yangerkun@huawei.com
Signed-off-by: yangerkun <yangerkun@huawei.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Yu Kuai <yukuai3@huawei.com>
Cc: ErKun Yang <yangerkun@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
fs/ramfs/inode.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/fs/ramfs/inode.c~ramfs-fix-mount-source-show-for-ramfs
+++ a/fs/ramfs/inode.c
@@ -202,6 +202,10 @@ static int ramfs_parse_param(struct fs_c
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) {
/*
_
Patches currently in -mm which might be from yangerkun@huawei.com are
ramfs-fix-mount-source-show-for-ramfs.patch
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: + ramfs-fix-mount-source-show-for-ramfs.patch added to -mm tree
2021-09-24 20:44 akpm
@ 2021-10-08 1:23 ` yangerkun
0 siblings, 0 replies; 3+ messages in thread
From: yangerkun @ 2021-10-08 1:23 UTC (permalink / raw)
To: akpm, mm-commits, viro
Gently ping for this patch...
在 2021/9/25 4:44, akpm@linux-foundation.org 写道:
>
> The patch titled
> Subject: ramfs: fix mount source show for ramfs
> has been added to the -mm tree. Its filename is
> ramfs-fix-mount-source-show-for-ramfs.patch
>
> This patch should soon appear at
> https://ozlabs.org/~akpm/mmots/broken-out/ramfs-fix-mount-source-show-for-ramfs.patch
> and later at
> https://ozlabs.org/~akpm/mmotm/broken-out/ramfs-fix-mount-source-show-for-ramfs.patch
>
> Before you just go and hit "reply", please:
> a) Consider who else should be cc'ed
> b) Prefer to cc a suitable mailing list as well
> c) Ideally: find the original patch on the mailing list and do a
> reply-to-all to that, adding suitable additional cc's
>
> *** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
>
> The -mm tree is included into linux-next and is updated
> there every 3-4 working days
>
> ------------------------------------------------------
> From: yangerkun <yangerkun@huawei.com>
> Subject: ramfs: fix mount source show for ramfs
>
> 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 like cgroup1_parse_param has do.
>
> Link: https://lkml.kernel.org/r/20210924091756.1906118-1-yangerkun@huawei.com
> Signed-off-by: yangerkun <yangerkun@huawei.com>
> Cc: Al Viro <viro@zeniv.linux.org.uk>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
> fs/ramfs/inode.c | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> --- a/fs/ramfs/inode.c~ramfs-fix-mount-source-show-for-ramfs
> +++ a/fs/ramfs/inode.c
> @@ -203,17 +203,20 @@ static int ramfs_parse_param(struct fs_c
> int opt;
>
> opt = fs_parse(fc, ramfs_fs_parameters, param, &result);
> - if (opt < 0) {
> + if (opt == -ENOPARAM) {
> + opt = vfs_parse_fs_param_source(fc, param);
> + if (opt != -ENOPARAM)
> + return opt;
> /*
> * We might like to report bad mount options here;
> * but traditionally ramfs has ignored all mount options,
> * and as it is used as a !CONFIG_SHMEM simple substitute
> * for tmpfs, better continue to ignore other mount options.
> */
> - if (opt == -ENOPARAM)
> - opt = 0;
> - return opt;
> + return 0;
> }
> + if (opt < 0)
> + return opt;
>
> switch (opt) {
> case Opt_mode:
> _
>
> Patches currently in -mm which might be from yangerkun@huawei.com are
>
> ramfs-fix-mount-source-show-for-ramfs.patch
>
> .
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* + ramfs-fix-mount-source-show-for-ramfs.patch added to -mm tree
@ 2021-09-24 20:44 akpm
2021-10-08 1:23 ` yangerkun
0 siblings, 1 reply; 3+ messages in thread
From: akpm @ 2021-09-24 20:44 UTC (permalink / raw)
To: mm-commits, viro, yangerkun
The patch titled
Subject: ramfs: fix mount source show for ramfs
has been added to the -mm tree. Its filename is
ramfs-fix-mount-source-show-for-ramfs.patch
This patch should soon appear at
https://ozlabs.org/~akpm/mmots/broken-out/ramfs-fix-mount-source-show-for-ramfs.patch
and later at
https://ozlabs.org/~akpm/mmotm/broken-out/ramfs-fix-mount-source-show-for-ramfs.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: yangerkun <yangerkun@huawei.com>
Subject: ramfs: fix mount source show for ramfs
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 like cgroup1_parse_param has do.
Link: https://lkml.kernel.org/r/20210924091756.1906118-1-yangerkun@huawei.com
Signed-off-by: yangerkun <yangerkun@huawei.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
fs/ramfs/inode.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
--- a/fs/ramfs/inode.c~ramfs-fix-mount-source-show-for-ramfs
+++ a/fs/ramfs/inode.c
@@ -203,17 +203,20 @@ static int ramfs_parse_param(struct fs_c
int opt;
opt = fs_parse(fc, ramfs_fs_parameters, param, &result);
- if (opt < 0) {
+ if (opt == -ENOPARAM) {
+ opt = vfs_parse_fs_param_source(fc, param);
+ if (opt != -ENOPARAM)
+ return opt;
/*
* We might like to report bad mount options here;
* but traditionally ramfs has ignored all mount options,
* and as it is used as a !CONFIG_SHMEM simple substitute
* for tmpfs, better continue to ignore other mount options.
*/
- if (opt == -ENOPARAM)
- opt = 0;
- return opt;
+ return 0;
}
+ if (opt < 0)
+ return opt;
switch (opt) {
case Opt_mode:
_
Patches currently in -mm which might be from yangerkun@huawei.com are
ramfs-fix-mount-source-show-for-ramfs.patch
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-08 1:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-12 21:50 + ramfs-fix-mount-source-show-for-ramfs.patch added to -mm tree akpm
2021-09-24 20:44 akpm
2021-10-08 1:23 ` yangerkun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).