git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
fs
/
9p
/
v9fs.c
diff --git
a/fs/9p/v9fs.c
b/fs/9p/v9fs.c
index
6135249
..
d9b561b
100644
(file)
--- a/
fs/9p/v9fs.c
+++ b/
fs/9p/v9fs.c
@@
-7,9
+7,8
@@
* Copyright (C) 2002 by Ron Minnich <rminnich@lanl.gov>
*
* This program is free software; you can redistribute it and/or modify
* Copyright (C) 2002 by Ron Minnich <rminnich@lanl.gov>
*
* This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@@
-24,10
+23,10
@@
*
*/
*
*/
-#include <linux/config.h>
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/fs.h>
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/fs.h>
+#include <linux/sched.h>
#include <linux/parser.h>
#include <linux/idr.h>
#include <linux/parser.h>
#include <linux/idr.h>
@@
-51,7
+50,7
@@
enum {
Opt_port, Opt_msize, Opt_uid, Opt_gid, Opt_afid, Opt_debug,
Opt_rfdno, Opt_wfdno,
/* String options */
Opt_port, Opt_msize, Opt_uid, Opt_gid, Opt_afid, Opt_debug,
Opt_rfdno, Opt_wfdno,
/* String options */
- Opt_name, Opt_remotename,
+ Opt_
u
name, Opt_remotename,
/* Options that take no arguments */
Opt_legacy, Opt_nodevmap, Opt_unix, Opt_tcp, Opt_fd,
/* Error token */
/* Options that take no arguments */
Opt_legacy, Opt_nodevmap, Opt_unix, Opt_tcp, Opt_fd,
/* Error token */
@@
-67,7
+66,7
@@
static match_table_t tokens = {
{Opt_rfdno, "rfdno=%u"},
{Opt_wfdno, "wfdno=%u"},
{Opt_debug, "debug=%x"},
{Opt_rfdno, "rfdno=%u"},
{Opt_wfdno, "wfdno=%u"},
{Opt_debug, "debug=%x"},
- {Opt_
name, "
name=%s"},
+ {Opt_
uname, "u
name=%s"},
{Opt_remotename, "aname=%s"},
{Opt_unix, "proto=unix"},
{Opt_tcp, "proto=tcp"},
{Opt_remotename, "aname=%s"},
{Opt_unix, "proto=unix"},
{Opt_tcp, "proto=tcp"},
@@
-116,7
+115,7
@@
static void v9fs_parse_options(char *options, struct v9fs_session_info *v9ses)
if (!*p)
continue;
token = match_token(p, tokens, args);
if (!*p)
continue;
token = match_token(p, tokens, args);
- if (token < Opt_name) {
+ if (token < Opt_
u
name) {
if ((ret = match_int(&args[0], &option)) < 0) {
dprintk(DEBUG_ERROR,
"integer field, but no integer?\n");
if ((ret = match_int(&args[0], &option)) < 0) {
dprintk(DEBUG_ERROR,
"integer field, but no integer?\n");
@@
-158,7
+157,7
@@
static void v9fs_parse_options(char *options, struct v9fs_session_info *v9ses)
case Opt_fd:
v9ses->proto = PROTO_FD;
break;
case Opt_fd:
v9ses->proto = PROTO_FD;
break;
- case Opt_name:
+ case Opt_
u
name:
match_strcpy(v9ses->name, &args[0]);
break;
case Opt_remotename:
match_strcpy(v9ses->name, &args[0]);
break;
case Opt_remotename:
@@
-289,7
+288,7
@@
v9fs_session_init(struct v9fs_session_info *v9ses,
/* set global debug level */
v9fs_debug_level = v9ses->debug;
/* set global debug level */
v9fs_debug_level = v9ses->debug;
- /* id pools that are session-dependent:
FIDs and TID
s */
+ /* id pools that are session-dependent:
fids and tag
s */
idr_init(&v9ses->fidpool.pool);
init_MUTEX(&v9ses->fidpool.lock);
idr_init(&v9ses->fidpool.pool);
init_MUTEX(&v9ses->fidpool.lock);
@@
-458,11
+457,18
@@
static int __init init_v9fs(void)
v9fs_error_init();
v9fs_error_init();
- printk(KERN_INFO "Installing v9fs 9
P
2000 file system support\n");
+ printk(KERN_INFO "Installing v9fs 9
p
2000 file system support\n");
ret = v9fs_mux_global_init();
ret = v9fs_mux_global_init();
- if (!ret)
- ret = register_filesystem(&v9fs_fs_type);
+ if (ret) {
+ printk(KERN_WARNING "v9fs: starting mux failed\n");
+ return ret;
+ }
+ ret = register_filesystem(&v9fs_fs_type);
+ if (ret) {
+ printk(KERN_WARNING "v9fs: registering file system failed\n");
+ v9fs_mux_global_exit();
+ }
return ret;
}
return ret;
}