Whamcloud - gitweb
LU-1812 ext4: ec_type has been dropped from ext4_ext_cache
[fs/lustre-release.git] / lustre / llite / llite_nfs.c
index 414f935..f231fb2 100644 (file)
@@ -66,8 +66,8 @@ static int ll_nfs_test_inode(struct inode *inode, void *opaque)
                          (struct lu_fid *)opaque);
 }
 
-static struct inode *search_inode_for_lustre(struct super_block *sb,
-                                             const struct lu_fid *fid)
+struct inode *search_inode_for_lustre(struct super_block *sb,
+                                     const struct lu_fid *fid)
 {
         struct ll_sb_info     *sbi = ll_s2sbi(sb);
         struct ptlrpc_request *req = NULL;
@@ -106,7 +106,7 @@ static struct inode *search_inode_for_lustre(struct super_block *sb,
                        PFID(fid), rc);
                 RETURN(ERR_PTR(rc));
         }
-        rc = ll_prep_inode(&inode, req, sb);
+        rc = ll_prep_inode(&inode, req, sb, NULL);
         ptlrpc_req_finished(req);
         if (rc)
                 RETURN(ERR_PTR(rc));
@@ -318,6 +318,7 @@ static struct dentry *ll_get_parent(struct dentry *dchild)
         static char           dotdot[] = "..";
         struct md_op_data     *op_data;
         int                   rc;
+       int                   lmmsize;
         ENTRY;
 
         LASSERT(dir && S_ISDIR(dir->i_mode));
@@ -327,8 +328,12 @@ static struct dentry *ll_get_parent(struct dentry *dchild)
         CDEBUG(D_INFO, "getting parent for (%lu,"DFID")\n",
                         dir->i_ino, PFID(ll_inode2fid(dir)));
 
-        op_data = ll_prep_md_op_data(NULL, dir, NULL, dotdot,
-                                     strlen(dotdot), 0,
+       rc = ll_get_max_mdsize(sbi, &lmmsize);
+       if (rc != 0)
+               RETURN(ERR_PTR(rc));
+
+       op_data = ll_prep_md_op_data(NULL, dir, NULL, dotdot,
+                                    strlen(dotdot), lmmsize,
                                      LUSTRE_OPC_ANY, NULL);
         if (IS_ERR(op_data))
                 RETURN((void *)op_data);