From: viro@parcelfarce.linux.theplanet.co.uk
To: Andries.Brouwer@cwi.nl
Cc: torvalds@transmeta.com, linux-kernel@vger.kernel.org
Subject: Re: [patch] change get_sb prototype
Date: Mon, 26 May 2003 02:02:41 +0100 [thread overview]
Message-ID: <20030526010241.GL6270@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <UTC200305260039.h4Q0dxZ03906.aeb@smtp.cwi.nl>
On Mon, May 26, 2003 at 02:39:59AM +0200, Andries.Brouwer@cwi.nl wrote:
> The boring patch below does not change behaviour.
> It does two things:
>
> (i) The prototypes for free_vfsmnt(), alloc_vfsmnt(), do_kern_mount()
> so far occurred in several individual c files. Now they are in
> <linux/mount.h>.
>
> (ii) do_kern_mount() has a third argument name that is typically
> a constant. It is called with "rootfs", "nfsd", type->name, "capifs",
> "usbdevfs", "binfmt_misc" etc. So, it should have a prototype that
> expresses this:
>
> do_kern_mount(const char *fstype, int flags, const char *name, void *data);
>
> This makes the ugly cast
>
> - return do_kern_mount(type->name, 0, (char *)type->name, NULL);
> + return do_kern_mount(type->name, 0, type->name, NULL);
>
> go away. Now do_kern_mount() calls type->get_sb(), so also get_sb()
> must have a const third argument. That is what the patch below does.
Eeek... What for? It's _much_ easier to kill silly const char * in
struct file_system_type. And no, I don't believe that const is of any
value in that case.
prev parent reply other threads:[~2003-05-26 0:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-26 0:39 Andries.Brouwer
2003-05-26 1:02 ` viro [this message]
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=20030526010241.GL6270@parcelfarce.linux.theplanet.co.uk \
--to=viro@parcelfarce.linux.theplanet.co.uk \
--cc=Andries.Brouwer@cwi.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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
all inboxes | Powered by JetHome®