From 0b23f323ae07c8d02ae8bdab8c65193e6678e003 Mon Sep 17 00:00:00 2001 From: nikita Date: Mon, 16 Oct 2006 15:07:35 +0000 Subject: [PATCH] mdt: mdt_shrink_reply(): do not assume body->eadatasize always contains EA size: it might be symlink. --- lustre/mdt/mdt_lib.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lustre/mdt/mdt_lib.c b/lustre/mdt/mdt_lib.c index b7f2e23..61fe2d2 100644 --- a/lustre/mdt/mdt_lib.c +++ b/lustre/mdt/mdt_lib.c @@ -494,7 +494,11 @@ void mdt_shrink_reply(struct mdt_thread_info *info, int offset, body = req_capsule_server_get(&info->mti_pill, &RMF_MDT_BODY); LASSERT(body != NULL); - md_size = body->eadatasize; + if (body->valid & (OBD_MD_FLDIREA|OBD_MD_FLEASIZE)) + md_size = body->eadatasize; + else + md_size = 0; + acl_size = body->aclsize; CDEBUG(D_INFO, "Shrink to md_size %d cookie_size %d \n", -- 1.8.3.1