Whamcloud - gitweb
minor fix in mds_finish_open
authorwangdi <wangdi>
Thu, 10 Jun 2004 09:07:17 +0000 (09:07 +0000)
committerwangdi <wangdi>
Thu, 10 Jun 2004 09:07:17 +0000 (09:07 +0000)
lustre/mds/mds_open.c

index 2f3e7d0..4dbc817 100644 (file)
@@ -619,8 +619,8 @@ static int mds_finish_open(struct ptlrpc_request *req, struct dentry *dchild,
         /* atomically create objects if necessary */
         down(&dchild->d_inode->i_sem);
         mode = dchild->d_inode->i_mode;
-        if ((S_ISREG(mode) && (body->valid & OBD_MD_FLEASIZE)) || 
-            (S_ISDIR(mode) && (body->valid & OBD_MD_FLDIREA))) {
+        if ((S_ISREG(mode) && !(body->valid & OBD_MD_FLEASIZE)) || 
+            (S_ISDIR(mode) && !(body->valid & OBD_MD_FLDIREA))) {
                 rc = mds_pack_md(obd, req->rq_repmsg, 2, body,
                                  dchild->d_inode, 0);
                 if (rc) {