[PATCH] v9fs: handle kthread_create failure, minor bugfixes
[deliverable/linux.git] / fs / 9p / vfs_inode.c
index 742bcd0dc4a7c2ee5f7a997a1be6105ca2a2f06e..d933ef1fbd8ac4917e5f6efb39cc71fd5abbf0ff 100644 (file)
@@ -768,6 +768,7 @@ void
 v9fs_stat2inode(struct v9fs_stat *stat, struct inode *inode,
        struct super_block *sb)
 {
+       int n;
        char ext[32];
        struct v9fs_session_info *v9ses = sb->s_fs_info;
 
@@ -791,7 +792,11 @@ v9fs_stat2inode(struct v9fs_stat *stat, struct inode *inode,
                int major = -1;
                int minor = -1;
 
-               v9fs_str_copy(ext, sizeof(ext), &stat->extension);
+               n = stat->extension.len;
+               if (n > sizeof(ext)-1)
+                       n = sizeof(ext)-1;
+               memmove(ext, stat->extension.str, n);
+               ext[n] = 0;
                sscanf(ext, "%c %u %u", &type, &major, &minor);
                switch (type) {
                case 'c':
This page took 0.027297 seconds and 5 git commands to generate.