From a6ae779f42537fe0622a52725fe5dde57f3f8f57 Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 24 Aug 2005 21:49:24 +0000 Subject: [PATCH 1/1] b=7178 r=tappro - avoid possibility to FLSIZE being sent back to client w/o checking --- lustre/mds/handler.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c index 26fccc6..e4eddc3 100644 --- a/lustre/mds/handler.c +++ b/lustre/mds/handler.c @@ -1459,6 +1459,10 @@ int mds_getattr_size(struct obd_device *obd, struct dentry *dentry, LASSERT(body != NULL); + /* XXX: quite a ugly hack, need to check old code + * drop FLSIZE/FLBLOCKS prior any checking to */ + body->valid &= ~(OBD_MD_FLSIZE | OBD_MD_FLBLOCKS); + if (dentry->d_inode == NULL || !S_ISREG(inode->i_mode)) RETURN(0); -- 1.8.3.1