Whamcloud - gitweb
LU-1291 mds: Test failure on test suite replay-single 44c
authoryangsheng <ys@whamcloud.com>
Wed, 23 May 2012 07:42:20 +0000 (15:42 +0800)
committerOleg Drokin <green@whamcloud.com>
Wed, 30 May 2012 20:34:51 +0000 (16:34 -0400)
The obd_notify needs protect by mds_notify_lock. Else LOV
maybe gone while __mds_lov_synchronize be called.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: Icb856b2a2b135711fd5681b0b4ebef0a1d78b988
Reviewed-on: http://review.whamcloud.com/2708
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/mds/mds_lov.c

index cdadb79..79d137f 100644 (file)
@@ -897,7 +897,6 @@ static int __mds_lov_synchronize(void *data)
 #endif
         EXIT;
 out:
-        cfs_up_read(&mds->mds_notify_lock);
         if (rc) {
                 /* Deactivate it for safety */
                 CERROR("%s sync failed %d, deactivating\n", obd_uuid2str(uuid),
@@ -907,6 +906,7 @@ out:
                         obd_notify(mds->mds_lov_obd, watched,
                                    OBD_NOTIFY_INACTIVE, NULL);
         }
+       cfs_up_read(&mds->mds_notify_lock);
 
         class_decref(obd, "mds_lov_synchronize", obd);
         return rc;