]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/nfs/idmap.c
[PATCH] struct path: make eCryptfs a user of struct path
[linux-2.6-omap-h63xx.git] / fs / nfs / idmap.c
index 231c20ffc0ff7ad74eb45657a33be1fc91e27547..82ad7110a1c0b75458ff84aeffdeb2c4423251ad 100644 (file)
@@ -84,7 +84,6 @@ struct idmap_hashtable {
 };
 
 struct idmap {
-       char                  idmap_path[48];
        struct dentry        *idmap_dentry;
        wait_queue_head_t     idmap_wq;
        struct idmap_msg      idmap_im;
@@ -114,16 +113,12 @@ nfs_idmap_new(struct nfs_client *clp)
        struct idmap *idmap;
        int error;
 
-       if (clp->cl_idmap != NULL)
-               return 0;
+       BUG_ON(clp->cl_idmap != NULL);
 
         if ((idmap = kzalloc(sizeof(*idmap), GFP_KERNEL)) == NULL)
                 return -ENOMEM;
 
-       snprintf(idmap->idmap_path, sizeof(idmap->idmap_path),
-           "%s/idmap", clp->cl_rpcclient->cl_pathname);
-
-        idmap->idmap_dentry = rpc_mkpipe(idmap->idmap_path,
+        idmap->idmap_dentry = rpc_mkpipe(clp->cl_rpcclient->cl_dentry, "idmap",
            idmap, &idmap_upcall_ops, 0);
         if (IS_ERR(idmap->idmap_dentry)) {
                error = PTR_ERR(idmap->idmap_dentry);