Re: + ramfs-fix-mount-source-show-for-ramfs.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Gently ping for this patch...

在 2021/9/25 4:44, akpm@xxxxxxxxxxxxxxxxxxxx 写道:

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@xxxxxxxxxx>
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@xxxxxxxxxx
Signed-off-by: yangerkun <yangerkun@xxxxxxxxxx>
Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

  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@xxxxxxxxxx are

ramfs-fix-mount-source-show-for-ramfs.patch

.




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux