From ae22ab4425f03f7e9fd5146d014c48b29dc3d8c3 Mon Sep 17 00:00:00 2001 From: wangdi Date: Tue, 19 Sep 2006 16:07:50 +0000 Subject: [PATCH] Branch: b_new we should put iam_it anyway --- lustre/mdd/mdd_handler.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lustre/mdd/mdd_handler.c b/lustre/mdd/mdd_handler.c index 04be69b..a553a59 100644 --- a/lustre/mdd/mdd_handler.c +++ b/lustre/mdd/mdd_handler.c @@ -1179,7 +1179,6 @@ static int mdd_dir_is_empty(const struct lu_context *ctx, int i; for (result = 0, i = 0; result == 0 && i < 3; ++i) result = iops->next(ctx, it); - iops->put(ctx, it); if (result == 0) result = -ENOTEMPTY; else if (result == +1) @@ -1189,6 +1188,8 @@ static int mdd_dir_is_empty(const struct lu_context *ctx, * Huh? Index contains no zero key? */ result = -EIO; + + iops->put(ctx, it); iops->fini(ctx, it); } else result = -ENOMEM; -- 1.8.3.1