Whamcloud - gitweb
Landing b_bug974 onto HEAD (20040213_1538).
[fs/lustre-release.git] / lustre / include / linux / obd_class.h
index 660f588..3e1a512 100644 (file)
@@ -621,17 +621,17 @@ static inline int obd_statfs(struct obd_device *obd, struct obd_statfs *osfs,
         OBD_COUNTER_INCREMENT(obd, statfs);
 
         CDEBUG(D_SUPER, "osfs %lu, max_age %lu\n", obd->obd_osfs_age, max_age);
-        if (obd->obd_osfs_age == 0 || time_before(obd->obd_osfs_age, max_age)) {
+        if (time_before(obd->obd_osfs_age, max_age)) {
                 rc = OBP(obd, statfs)(obd, osfs, max_age);
-                spin_lock(&obd->obd_dev_lock);
+                spin_lock(&obd->obd_osfs_lock);
                 memcpy(&obd->obd_osfs, osfs, sizeof(obd->obd_osfs));
                 obd->obd_osfs_age = jiffies;
-                spin_unlock(&obd->obd_dev_lock);
+                spin_unlock(&obd->obd_osfs_lock);
         } else {
                 CDEBUG(D_SUPER, "using cached obd_statfs data\n");
-                spin_lock(&obd->obd_dev_lock);
+                spin_lock(&obd->obd_osfs_lock);
                 memcpy(osfs, &obd->obd_osfs, sizeof(*osfs));
-                spin_unlock(&obd->obd_dev_lock);
+                spin_unlock(&obd->obd_osfs_lock);
         }
         RETURN(rc);
 }
@@ -724,10 +724,10 @@ static inline  int obd_prep_async_page(struct obd_export *exp,
         RETURN(ret);
 }
 
-static inline int obd_queue_async_io(struct obd_export *exp, 
-                                     struct lov_stripe_md *lsm, 
-                                     struct lov_oinfo *loi, void *cookie, 
-                                     int cmd, obd_off off, int count, 
+static inline int obd_queue_async_io(struct obd_export *exp,
+                                     struct lov_stripe_md *lsm,
+                                     struct lov_oinfo *loi, void *cookie,
+                                     int cmd, obd_off off, int count,
                                      obd_flag brw_flags, obd_flag async_flags)
 {
         int rc;