Whamcloud - gitweb
Initialize lock handle so that we don't fail ASSERT on error cleanup.
authoradilger <adilger>
Sat, 3 Apr 2004 19:27:21 +0000 (19:27 +0000)
committeradilger <adilger>
Sat, 3 Apr 2004 19:27:21 +0000 (19:27 +0000)
b=3057
r=phil

lustre/ChangeLog
lustre/liblustre/rw.c
lustre/llite/file.c

index a0c33b6..598fba1 100644 (file)
@@ -8,6 +8,7 @@ tbd  Cluster File Systems, Inc. <info@clusterfs.com>
        - update client's i_blocks count via lvb messages (2543)
        - handle intent open/close of special files properly (1557)
        - mount MDS with errors=remount-ro, like obdfilter (2009)
+       - initialize lock handle to avoid ASSERT on error cleanup (3057)
        * miscellania
        - allow default OST striping configuration per directory (1414)
 
index 1894e79..a737a14 100644 (file)
@@ -75,13 +75,12 @@ static int llu_extent_lock_callback(struct ldlm_lock *lock,
         struct lustre_handle lockh = { 0 };
         int rc;
         ENTRY;
-        
 
         if ((unsigned long)data > 0 && (unsigned long)data < 0x1000) {
                 LDLM_ERROR(lock, "cancelling lock with bad data %p", data);
                 LBUG();
         }
-        
+
         switch (flag) {
         case LDLM_CB_BLOCKING:
                 ldlm_lock2handle(lock, &lockh);
@@ -182,7 +181,7 @@ int llu_glimpse_size(struct inode *inode, struct ost_lvb *lvb)
         struct llu_inode_info *lli = llu_i2info(inode);
         struct llu_sb_info *sbi = llu_i2sbi(inode);
         ldlm_policy_data_t policy = { .l_extent = { 0, OBD_OBJECT_EOF } };
-        struct lustre_handle lockh;
+        struct lustre_handle lockh = { 0 };
         int rc, flags = LDLM_FL_HAS_INTENT;
         ENTRY;
 
index 23fac76..7456393 100644 (file)
@@ -123,7 +123,7 @@ static int ll_intent_file_open(struct file *file, void *lmm,
 
         ll_prepare_mdc_op_data(&data, parent->d_inode, NULL, name, len, O_RDWR);
 
-        rc = mdc_enqueue(sbi->ll_mdc_exp, LDLM_PLAIN, itp, LCK_PR, &data,
+        rc = mdc_enqueue(sbi->ll_mdc_exp, LDLM_PLAIN, itp, LCK_PW, &data,
                          &lockh, lmm, lmmsize, ldlm_completion_ast,
                          ll_mdc_blocking_ast, parent->d_inode);
         if (rc < 0)
@@ -613,7 +613,7 @@ int ll_glimpse_size(struct inode *inode, struct ost_lvb *lvb)
         struct ll_inode_info *lli = ll_i2info(inode);
         struct ll_sb_info *sbi = ll_i2sbi(inode);
         ldlm_policy_data_t policy = { .l_extent = { 0, OBD_OBJECT_EOF } };
-        struct lustre_handle lockh;
+        struct lustre_handle lockh = { 0 };
         int rc, flags = LDLM_FL_HAS_INTENT;
         ENTRY;