X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;ds=sidebyside;f=lustre%2Fmdd%2Fmdd_dir.c;h=f9d0c7f5bf88fa3b6a70a44a0755ef25e38d40e3;hb=a77212cd13627b2b9f1835c48599e91c82aeed9d;hp=ba0ab43f39368a87d28850022d87c389370add6b;hpb=2e0ad6d40070d38076c77038b7d48ac90af7b130;p=fs%2Flustre-release.git diff --git a/lustre/mdd/mdd_dir.c b/lustre/mdd/mdd_dir.c index ba0ab43..f9d0c7f 100644 --- a/lustre/mdd/mdd_dir.c +++ b/lustre/mdd/mdd_dir.c @@ -250,8 +250,8 @@ static int mdd_dir_is_empty(const struct lu_env *env, RETURN(-ENOTDIR); iops = &obj->do_index_ops->dio_it; - it = iops->init(env, obj, BYPASS_CAPA); - if (it != NULL) { + it = iops->init(env, obj, LUDA_64BITHASH, BYPASS_CAPA); + if (!IS_ERR(it)) { result = iops->get(env, it, (const void *)""); if (result > 0) { int i; @@ -270,7 +270,7 @@ static int mdd_dir_is_empty(const struct lu_env *env, iops->put(env, it); iops->fini(env, it); } else - result = -ENOMEM; + result = PTR_ERR(it); RETURN(result); } @@ -2442,7 +2442,7 @@ static int mdd_links_add(const struct lu_env *env, PFID(mdd_object_fid(mdd_obj))); } - if (buf->lb_vmalloc) + if (buf->lb_len > OBD_ALLOC_BIG) /* if we vmalloced a large buffer drop it */ mdd_buf_put(buf); @@ -2529,7 +2529,7 @@ out: oldlname->ln_namelen, oldlname->ln_name, rc, PFID(mdd_object_fid(mdd_obj))); - if (buf->lb_vmalloc) + if (buf->lb_len > OBD_ALLOC_BIG) /* if we vmalloced a large buffer drop it */ mdd_buf_put(buf);