CERROR("md_getattr failed for root: rc = %d\n", err);
GOTO(out_dt_fid, err);
}
-
+ memset(&lmd, 0, sizeof(lmd));
err = md_get_lustre_md(sbi->ll_md_exp, request,
REPLY_REC_OFF, sbi->ll_dt_exp, sbi->ll_md_exp,
&lmd);
LASSERT(fid_is_sane(&sbi->ll_root_fid));
root = ll_iget(sb, ll_fid_build_ino(sbi, &sbi->ll_root_fid), &lmd);
+ md_free_lustre_md(sbi->ll_md_exp, &lmd);
ptlrpc_req_finished(request);
if (root == NULL || is_bad_inode(root)) {
- md_free_lustre_md(sbi->ll_dt_exp, &lmd);
+ if (lmd.lsm)
+ obd_free_memmd(sbi->ll_dt_exp, &lmd.lsm);
+#ifdef CONFIG_FS_POSIX_ACL
+ if (lmd.posix_acl) {
+ posix_acl_release(lmd.posix_acl);
+ lmd.posix_acl = NULL;
+ }
+#endif
CERROR("lustre_lite: bad iget4 for root\n");
GOTO(out_root, err = -EBADF);
}
LASSERT(*inode || sb);
sbi = sb ? ll_s2sbi(sb) : ll_i2sbi(*inode);
prune_deathrow(sbi, 1);
+ memset(&md, 0, sizeof(struct lustre_md));
rc = md_get_lustre_md(sbi->ll_md_exp, req, offset,
sbi->ll_dt_exp, sbi->ll_md_exp, &md);
*inode = ll_iget(sb, ll_fid_build_ino(sbi, &md.body->fid1), &md);
if (*inode == NULL || is_bad_inode(*inode)) {
- md_free_lustre_md(sbi->ll_dt_exp, &md);
+ if (md.lsm)
+ obd_free_memmd(sbi->ll_dt_exp, &md.lsm);
+#ifdef CONFIG_FS_POSIX_ACL
+ if (md.posix_acl) {
+ posix_acl_release(md.posix_acl);
+ md.posix_acl = NULL;
+ }
+#endif
rc = -ENOMEM;
CERROR("new_inode -fatal: rc %d\n", rc);
GOTO(out, rc);
rc = obd_checkmd(sbi->ll_dt_exp, sbi->ll_md_exp,
ll_i2info(*inode)->lli_smd);
out:
+ md_free_lustre_md(sbi->ll_md_exp, &md);
RETURN(rc);
}