Whamcloud - gitweb
Reverted #974 for now as it causes problems for people.
[fs/lustre-release.git] / lustre / include / linux / lustre_fsfilt.h
index d89f187..8446e5b 100644 (file)
@@ -28,6 +28,7 @@
 #ifdef __KERNEL__
 
 #include <linux/obd.h>
+#include <linux/fs.h>
 
 typedef void (*fsfilt_cb_t)(struct obd_device *obd, __u64 last_rcvd,
                             void *data, int error);
@@ -218,22 +219,10 @@ static inline int fsfilt_add_journal_cb(struct obd_device *obd, __u64 last_rcvd,
                                                  cb_func, cb_data);
 }
 
-/* very similar to obd_statfs(), but caller already holds obd_osfs_lock */
 static inline int fsfilt_statfs(struct obd_device *obd, struct super_block *sb,
-                                unsigned long max_age)
+                                struct obd_statfs *osfs)
 {
-        int rc = 0;
-
-        CDEBUG(D_SUPER, "osfs %lu, max_age %lu\n", obd->obd_osfs_age, max_age);
-        if (time_before(obd->obd_osfs_age, max_age)) {
-                rc = obd->obd_fsops->fs_statfs(sb, &obd->obd_osfs);
-                if (rc == 0) /* N.B. statfs can't really fail */
-                        obd->obd_osfs_age = jiffies;
-        } else {
-                CDEBUG(D_SUPER, "using cached obd_statfs data\n");
-        }
-
-        return rc;
+        return obd->obd_fsops->fs_statfs(sb, osfs);
 }
 
 static inline int fsfilt_sync(struct obd_device *obd, struct super_block *sb)