diff options
| author | Andries E. Brouwer <andries.brouwer@cwi.nl> | 2003-05-25 04:04:50 -0700 |
|---|---|---|
| committer | Jaroslav Kysela <perex@suse.cz> | 2003-05-25 04:04:50 -0700 |
| commit | 2f124a73c7e036388e2e998c8ae1abf9d0b3204a (patch) | |
| tree | 5d1014d03ebc7952529e11b7a88d782c033aee7d /kernel | |
| parent | 4b6243ca36127091c17dba9dff98ba46f619f506 (diff) | |
[PATCH] change get_sb prototype
(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.
If I am not mistaken, precisely two filesystems do not treat this
argument as a constant, namely afs and cifs. A separate patch
gives some cleanup there.
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/futex.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/futex.c b/kernel/futex.c index df2dcbf557d0..5cd746c3c86c 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -545,7 +545,7 @@ asmlinkage long sys_futex(u32 __user *uaddr, int op, int val, static struct super_block * futexfs_get_sb(struct file_system_type *fs_type, - int flags, char *dev_name, void *data) + int flags, const char *dev_name, void *data) { return get_sb_pseudo(fs_type, "futex", NULL, 0xBAD1DEA); } |
