diff options
author | Latchesar Ionkov <lucho@ionkov.net> | 2006-01-08 04:05:02 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-08 23:14:06 -0500 |
commit | 1dac06b20dcc8078dab037bd70652c69c67ba672 (patch) | |
tree | 34436f474074aa2760604555e3aa9b02df18fce2 /fs/9p/vfs_inode.c | |
parent | 531b1094b74365dcc55fa464d28a9a2497ae825d (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_inode.c')
-rw-r--r-- | fs/9p/vfs_inode.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index 742bcd0dc4a7..d933ef1fbd8a 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c | |||
@@ -768,6 +768,7 @@ void | |||
768 | v9fs_stat2inode(struct v9fs_stat *stat, struct inode *inode, | 768 | v9fs_stat2inode(struct v9fs_stat *stat, struct inode *inode, |
769 | struct super_block *sb) | 769 | struct super_block *sb) |
770 | { | 770 | { |
771 | int n; | ||
771 | char ext[32]; | 772 | char ext[32]; |
772 | struct v9fs_session_info *v9ses = sb->s_fs_info; | 773 | struct v9fs_session_info *v9ses = sb->s_fs_info; |
773 | 774 | ||
@@ -791,7 +792,11 @@ v9fs_stat2inode(struct v9fs_stat *stat, struct inode *inode, | |||
791 | int major = -1; | 792 | int major = -1; |
792 | int minor = -1; | 793 | int minor = -1; |
793 | 794 | ||
794 | v9fs_str_copy(ext, sizeof(ext), &stat->extension); | 795 | n = stat->extension.len; |
796 | if (n > sizeof(ext)-1) | ||
797 | n = sizeof(ext)-1; | ||
798 | memmove(ext, stat->extension.str, n); | ||
799 | ext[n] = 0; | ||
795 | sscanf(ext, "%c %u %u", &type, &major, &minor); | 800 | sscanf(ext, "%c %u %u", &type, &major, &minor); |
796 | switch (type) { | 801 | switch (type) { |
797 | case 'c': | 802 | case 'c': |