]> err.no Git - linux-2.6/blobdiff - fs/gfs2/lm.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq
[linux-2.6] / fs / gfs2 / lm.c
index fb918c7de655d05cffdd022cef8c490ed758b65a..cfcc39b86a5369287e78b6f658c41374964122ee 100644 (file)
@@ -7,16 +7,15 @@
  * of the GNU General Public License version 2.
  */
 
-#include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/spinlock.h>
 #include <linux/completion.h>
 #include <linux/buffer_head.h>
 #include <linux/delay.h>
 #include <linux/gfs2_ondisk.h>
+#include <linux/lm_interface.h>
 
 #include "gfs2.h"
-#include "lm_interface.h"
 #include "incore.h"
 #include "glock.h"
 #include "lm.h"
@@ -76,7 +75,7 @@ int gfs2_lm_mount(struct gfs2_sbd *sdp, int silent)
                sdp->sd_args.ar_localcaching = 1;
        }
 
- out:
+out:
        return error;
 }
 
@@ -104,14 +103,8 @@ int gfs2_lm_withdraw(struct gfs2_sbd *sdp, char *fmt, ...)
        vprintk(fmt, args);
        va_end(args);
 
-       fs_err(sdp, "about to withdraw from the cluster\n");
+       fs_err(sdp, "about to withdraw this file system\n");
        BUG_ON(sdp->sd_args.ar_debug);
-       
-
-       fs_err(sdp, "waiting for outstanding I/O\n");
-
-       /* FIXME: suspend dm device so oustanding bio's complete
-          and all further io requests fail */
 
        fs_err(sdp, "telling LM to withdraw\n");
        gfs2_withdraw_lockproto(&sdp->sd_lockstruct);
@@ -122,7 +115,7 @@ int gfs2_lm_withdraw(struct gfs2_sbd *sdp, char *fmt, ...)
 }
 
 int gfs2_lm_get_lock(struct gfs2_sbd *sdp, struct lm_lockname *name,
-                    lm_lock_t **lockp)
+                    void **lockp)
 {
        int error = -EIO;
        if (likely(!test_bit(SDF_SHUTDOWN, &sdp->sd_flags)))
@@ -131,13 +124,13 @@ int gfs2_lm_get_lock(struct gfs2_sbd *sdp, struct lm_lockname *name,
        return error;
 }
 
-void gfs2_lm_put_lock(struct gfs2_sbd *sdp, lm_lock_t *lock)
+void gfs2_lm_put_lock(struct gfs2_sbd *sdp, void *lock)
 {
        if (likely(!test_bit(SDF_SHUTDOWN, &sdp->sd_flags)))
                sdp->sd_lockstruct.ls_ops->lm_put_lock(lock);
 }
 
-unsigned int gfs2_lm_lock(struct gfs2_sbd *sdp, lm_lock_t *lock,
+unsigned int gfs2_lm_lock(struct gfs2_sbd *sdp, void *lock,
                          unsigned int cur_state, unsigned int req_state,
                          unsigned int flags)
 {
@@ -148,7 +141,7 @@ unsigned int gfs2_lm_lock(struct gfs2_sbd *sdp, lm_lock_t *lock,
        return ret;
 }
 
-unsigned int gfs2_lm_unlock(struct gfs2_sbd *sdp, lm_lock_t *lock,
+unsigned int gfs2_lm_unlock(struct gfs2_sbd *sdp, void *lock,
                            unsigned int cur_state)
 {
        int ret = 0;
@@ -157,13 +150,13 @@ unsigned int gfs2_lm_unlock(struct gfs2_sbd *sdp, lm_lock_t *lock,
        return ret;
 }
 
-void gfs2_lm_cancel(struct gfs2_sbd *sdp, lm_lock_t *lock)
+void gfs2_lm_cancel(struct gfs2_sbd *sdp, void *lock)
 {
        if (likely(!test_bit(SDF_SHUTDOWN, &sdp->sd_flags)))
                sdp->sd_lockstruct.ls_ops->lm_cancel(lock);
 }
 
-int gfs2_lm_hold_lvb(struct gfs2_sbd *sdp, lm_lock_t *lock, char **lvbp)
+int gfs2_lm_hold_lvb(struct gfs2_sbd *sdp, void *lock, char **lvbp)
 {
        int error = -EIO;
        if (likely(!test_bit(SDF_SHUTDOWN, &sdp->sd_flags)))
@@ -171,7 +164,7 @@ int gfs2_lm_hold_lvb(struct gfs2_sbd *sdp, lm_lock_t *lock, char **lvbp)
        return error;
 }
 
-void gfs2_lm_unhold_lvb(struct gfs2_sbd *sdp, lm_lock_t *lock, char *lvb)
+void gfs2_lm_unhold_lvb(struct gfs2_sbd *sdp, void *lock, char *lvb)
 {
        if (likely(!test_bit(SDF_SHUTDOWN, &sdp->sd_flags)))
                sdp->sd_lockstruct.ls_ops->lm_unhold_lvb(lock, lvb);