aboutsummaryrefslogtreecommitdiffstats
path: root/fs/9p/vfs_super.c
diff options
context:
space:
mode:
authorLatchesar Ionkov <lucho@ionkov.net>2006-01-08 04:05:02 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-08 23:14:06 -0500
commit1dac06b20dcc8078dab037bd70652c69c67ba672 (patch)
tree34436f474074aa2760604555e3aa9b02df18fce2 /fs/9p/vfs_super.c
parent531b1094b74365dcc55fa464d28a9a2497ae825d (diff)
[PATCH] v9fs: handle kthread_create failure, minor bugfixes
- remove unnecessary -ENOMEM assignments - return correct value when buf_check_size for second time in a buffer - handle failures when create_workqueue and kthread_create are called - use kzalloc instead of kmalloc/memset 0 - v9fs_str_copy and v9fs_str_compare were buggy, were used only in one place, correct the logic and move it to the place it is used. Signed-off-by: Latchesar Ionkov <lucho@ionkov.net> Cc: Eric Van Hensbergen <ericvh@ericvh.myip.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/9p/vfs_super.c')
-rw-r--r--fs/9p/vfs_super.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c
index d4d71a9ca573..ae0f06b3c11a 100644
--- a/fs/9p/vfs_super.c
+++ b/fs/9p/vfs_super.c
@@ -122,11 +122,10 @@ static struct super_block *v9fs_get_sb(struct file_system_type
122 122
123 dprintk(DEBUG_VFS, " \n"); 123 dprintk(DEBUG_VFS, " \n");
124 124
125 v9ses = kmalloc(sizeof(struct v9fs_session_info), GFP_KERNEL); 125 v9ses = kzalloc(sizeof(struct v9fs_session_info), GFP_KERNEL);
126 if (!v9ses) 126 if (!v9ses)
127 return ERR_PTR(-ENOMEM); 127 return ERR_PTR(-ENOMEM);
128 128
129 memset(v9ses, 0, sizeof(struct v9fs_session_info));
130 if ((newfid = v9fs_session_init(v9ses, dev_name, data)) < 0) { 129 if ((newfid = v9fs_session_init(v9ses, dev_name, data)) < 0) {
131 dprintk(DEBUG_ERROR, "problem initiating session\n"); 130 dprintk(DEBUG_ERROR, "problem initiating session\n");
132 kfree(v9ses); 131 kfree(v9ses);