From: yury Date: Mon, 25 Apr 2005 10:31:50 +0000 (+0000) Subject: - fix for #6202 accordingly to liangzhen@clusterfs.com patch X-Git-Tag: 1.4.10~1237 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=9f430dd595756aad04dab90968b5dd4053994a1f;p=fs%2Flustre-release.git - fix for #6202 accordingly to liangzhen@clusterfs.com patch --- 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) &&