]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/9p/vfs_super.c
Merge branch 'master'
[linux-2.6-omap-h63xx.git] / fs / 9p / vfs_super.c
index 2c4fa75be025db71498905564520905a07ad3782..b0a0ae509c00524d27dd306541b0935321766514 100644 (file)
@@ -8,9 +8,8 @@
  *  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
@@ -146,7 +145,6 @@ static struct super_block *v9fs_get_sb(struct file_system_type
        inode->i_gid = gid;
 
        root = d_alloc_root(inode);
-
        if (!root) {
                retval = -ENOMEM;
                goto put_back_sb;
@@ -158,15 +156,20 @@ static struct super_block *v9fs_get_sb(struct file_system_type
        if (stat_result < 0) {
                dprintk(DEBUG_ERROR, "stat error\n");
                v9fs_t_clunk(v9ses, newfid);
-               v9fs_put_idpool(newfid, &v9ses->fidpool);
        } else {
                /* Setup the Root Inode */
-               root_fid = v9fs_fid_create(root, v9ses, newfid, 0);
+               root_fid = v9fs_fid_create(v9ses, newfid);
                if (root_fid == NULL) {
                        retval = -ENOMEM;
                        goto put_back_sb;
                }
 
+               retval = v9fs_fid_insert(root_fid, root);
+               if (retval < 0) {
+                       kfree(fcall);
+                       goto put_back_sb;
+               }
+
                root_fid->qid = fcall->params.rstat.stat.qid;
                root->d_inode->i_ino =
                    v9fs_qid2ino(&fcall->params.rstat.stat.qid);
@@ -258,7 +261,7 @@ static struct super_operations v9fs_super_ops = {
 };
 
 struct file_system_type v9fs_fs_type = {
-       .name = "9P",
+       .name = "9p",
        .get_sb = v9fs_get_sb,
        .kill_sb = v9fs_kill_super,
        .owner = THIS_MODULE,