public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "René Scharfe" <l.s.r@web.de>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: linux-kernel@vger.kernel.org, trivial@rustcorp.com.au
Subject: [PATCH] hugetlbfs: fix error reporting in case of invalid mount options
Date: Sat, 7 Jun 2003 14:55:32 +0200	[thread overview]
Message-ID: <20030607145532.2bc66f38.l.s.r@web.de> (raw)

Hi Linus,

there is not much point in trying to print the mount options after
hugetlbfs_parse_options() went over them.

Since it employs strsep(), it cuts the option string into pieces by
replacing all commas with NUL characters. A following printk() will
always show the first option, only, which could be confusing.

The patch below changes hugetlbfs to not try to echo the string of
mount options in case of an error at all. It wouldn't tell us anything
we didn't know before, anyway.

René



diff -u ./fs/hugetlbfs/inode.c~ ./fs/hugetlbfs/inode.c
--- ./fs/hugetlbfs/inode.c~	2003-06-07 14:21:29.000000000 +0200
+++ ./fs/hugetlbfs/inode.c	2003-06-07 14:21:49.000000000 +0200
@@ -525,7 +525,7 @@
 
 	ret = hugetlbfs_parse_options(data, &config);
 	if (ret) {
-		printk("hugetlbfs: invalid mount options: %s.\n", data);
+		printk(KERN_ERR "hugetlbfs: invalid mount options.\n");
 		return ret;
 	}
 	sb->s_blocksize = PAGE_CACHE_SIZE;



             reply	other threads:[~2003-06-07 12:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-07 12:55 René Scharfe [this message]
2003-06-07 16:35 ` [PATCH] hugetlbfs: fix error reporting in case of invalid mount options William Lee Irwin III
2003-06-07 17:29   ` René Scharfe
2003-06-07 17:16     ` William Lee Irwin III

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030607145532.2bc66f38.l.s.r@web.de \
    --to=l.s.r@web.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    --cc=trivial@rustcorp.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox