Whamcloud - gitweb
b=4054
authoralex <alex>
Mon, 2 Aug 2004 14:39:03 +0000 (14:39 +0000)
committeralex <alex>
Mon, 2 Aug 2004 14:39:03 +0000 (14:39 +0000)
- in RESENT case mds_getattr_name() doesn't take dentry for parent.
  so, we have no mea to check mds validness

lustre/mds/handler.c

index 855e534..d5e0d44 100644 (file)
@@ -977,6 +977,11 @@ static int mds_getattr_name(int offset, struct ptlrpc_request *req,
                                                  child_part, clone_info);
                 if (rc)
                         GOTO(cleanup, rc);
+                
+                /* let's make sure this name should leave on this mds node */
+                rc = mds_check_mds_num(obd, dparent->d_inode, name, namesize);
+                if (rc)
+                        GOTO(cleanup, rc);
         } else {
                 struct ldlm_lock *granted_lock;
                 struct ll_fid child_fid;
@@ -995,11 +1000,6 @@ static int mds_getattr_name(int offset, struct ptlrpc_request *req,
 
         cleanup_phase = 2; /* dchild, dparent, locks */
 
-        /* let's make sure this name should leave on this mds node */
-        rc = mds_check_mds_num(obd, dparent->d_inode, name, namesize);
-        if (rc)
-                GOTO(cleanup, rc);
-
 fill_inode:
 
         if (!DENTRY_VALID(dchild)) {