[lkml]   [2003]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] hugetlbfs: fix error reporting in case of invalid mount options
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.


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;

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:36    [W:0.036 / U:9.056 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site