Whamcloud - gitweb
Branch b1_4
authornathan <nathan>
Sat, 9 Apr 2005 16:52:18 +0000 (16:52 +0000)
committernathan <nathan>
Sat, 9 Apr 2005 16:52:18 +0000 (16:52 +0000)
b=4834
r=adilger
llog_finish before mntput

lustre/mds/handler.c
lustre/obdfilter/filter.c

index 06832c2..42367a2 100644 (file)
@@ -1971,6 +1971,12 @@ static int mds_cleanup(struct obd_device *obd)
         }
         mds_fs_cleanup(obd);
 
+        /* 2 seems normal on mds, (may_umount() also expects 2
+          fwiw), but we only see 1 at this point in obdfilter. */
+        if (atomic_read(&obd->u.mds.mds_vfsmnt->mnt_count) > 2)
+                CERROR("%s: mount busy, mnt_count %d != 2\n", obd->obd_name,
+                       atomic_read(&obd->u.mds.mds_vfsmnt->mnt_count));
+
         /* We can only unlock kernel if we are in the context of sys_ioctl,
            otherwise we never called lock_kernel */
         if (kernel_locked()) {
@@ -1978,11 +1984,7 @@ static int mds_cleanup(struct obd_device *obd)
                 must_relock++;
         }
 
-        /* 2 seems normal on mds, (may_umount() also expects 2
-          fwiw), but we only see 1 at this point in obdfilter. */
-        if (atomic_read(&obd->u.mds.mds_vfsmnt->mnt_count) > 2)
-                CERROR("%s: mount busy, mnt_count %d != 2\n", obd->obd_name,
-                       atomic_read(&obd->u.mds.mds_vfsmnt->mnt_count));
+        obd_llog_finish(obd, 0);
 
         mntput(mds->mds_vfsmnt);
         mds->mds_sb = NULL;
@@ -1996,8 +1998,6 @@ static int mds_cleanup(struct obd_device *obd)
         }
         spin_unlock_bh(&obd->obd_processing_task_lock);
 
-        obd_llog_finish(obd, 0);
-
         ll_clear_rdonly(save_dev);
         
         if (must_relock)
index 9ede6b2..4dcf70e 100644 (file)
@@ -1406,12 +1406,13 @@ static int filter_cleanup(struct obd_device *obd)
                 unlock_kernel();
                 must_relock++;
         }
+        
+        obd_llog_finish(obd, 0);
 
         mntput(filter->fo_vfsmnt);
         //destroy_buffers(filter->fo_sb->s_dev);
         filter->fo_sb = NULL;
 
-        obd_llog_finish(obd, 0);
 
         ll_clear_rdonly(save_dev);