From 9f430dd595756aad04dab90968b5dd4053994a1f Mon Sep 17 00:00:00 2001 From: yury Date: Mon, 25 Apr 2005 10:31:50 +0000 Subject: [PATCH] - fix for #6202 accordingly to liangzhen@clusterfs.com patch --- lustre/mds/handler.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c index 6d7f7e3..bf999c0 100644 --- a/lustre/mds/handler.c +++ b/lustre/mds/handler.c @@ -1083,8 +1083,13 @@ static int mds_getattr_internal(struct obd_device *obd, struct dentry *dentry, if ((S_ISREG(inode->i_mode) && (reqbody->valid & OBD_MD_FLEASIZE)) || (S_ISDIR(inode->i_mode) && (reqbody->valid & OBD_MD_FLDIREA))) { - rc = mds_pack_md(obd, req->rq_repmsg, reply_off + 1, body, - inode, 1, (reqbody->valid & OBD_MD_MEA) ? 1 : 0); + + /* guessing what kind og attribute do we need. */ + int is_mea = (S_ISDIR(inode->i_mode) && + (reqbody->valid & OBD_MD_MEA) != 0); + + rc = mds_pack_md(obd, req->rq_repmsg, reply_off + 1, + body, inode, 1, is_mea); /* if we have LOV EA data, the OST holds size, atime, mtime. */ if (!(body->valid & OBD_MD_FLEASIZE) && -- 1.8.3.1