[GFS2] don't try to lockfs after shutdown
authorDavid Teigland <teigland@redhat.com>
Wed, 6 Dec 2006 17:46:33 +0000 (11:46 -0600)
committerSteven Whitehouse <swhiteho@redhat.com>
Mon, 5 Feb 2007 18:35:44 +0000 (13:35 -0500)
If an fs has already been shut down, a lockfs callback should do nothing.
An fs that's been shut down can't acquire locks or do anything with
respect to the cluster.

Also, remove FIXME comment in withdraw function.  The missing bits of the
withdraw procedure are now all done by user space.

Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/lm.c
fs/gfs2/ops_super.c

index effe4a337c1dbce0d8156545b393794d4163aeb6..e30673dd37e017565d801492dda8248754c8e6a8 100644 (file)
@@ -104,15 +104,9 @@ 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);
        fs_err(sdp, "withdrawn\n");
index 7685b46f934b4ad07c419a4b11b4eef60aa0c167..b2837839eed9e44a6615ad72cb13b25a8b4f9aef 100644 (file)
@@ -173,6 +173,9 @@ static void gfs2_write_super_lockfs(struct super_block *sb)
        struct gfs2_sbd *sdp = sb->s_fs_info;
        int error;
 
+       if (test_bit(SDF_SHUTDOWN, &sdp->sd_flags))
+               return;
+
        for (;;) {
                error = gfs2_freeze_fs(sdp);
                if (!error)