All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Fasheh <mfasheh@suse.de>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 6/6] Disallow cluster_stack changes if fs are mounted
Date: Mon, 9 Sep 2013 14:54:23 -0700	[thread overview]
Message-ID: <20130909215423.GF31381@wotan.suse.de> (raw)
In-Reply-To: <20130906032932.GA4192@shrek.lan>

On Thu, Sep 05, 2013 at 10:29:37PM -0500, Goldwyn Rodrigues wrote:
> diff --git a/fs/ocfs2/stackglue.h b/fs/ocfs2/stackglue.h
> index c953290..9eeeff03 100644
> --- a/fs/ocfs2/stackglue.h
> +++ b/fs/ocfs2/stackglue.h
> @@ -291,6 +291,9 @@ int ocfs2_plock(struct ocfs2_cluster_connection *conn, u64 ino,
>  
>  void ocfs2_stack_glue_set_max_proto_version(struct ocfs2_protocol_version *max_proto);
>  
> +void ocfs2_inc_mount_count(void);
> +void ocfs2_dec_mount_count(void);
> +
>  
>  /* Used by stack plugins */
>  int ocfs2_stack_glue_register(struct ocfs2_stack_plugin *plugin);
> diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
> index 60f3d8e..c91087c 100644
> --- a/fs/ocfs2/super.c
> +++ b/fs/ocfs2/super.c
> @@ -1214,6 +1214,7 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent)
>  
>  	/* Start this when the mount is almost sure of being successful */
>  	ocfs2_orphan_scan_start(osb);
> +	ocfs2_inc_mount_count();
>  
>  	return status;
>  
> @@ -1253,6 +1254,7 @@ static void ocfs2_kill_sb(struct super_block *sb)
>  	spin_unlock(&dentry_list_lock);
>  	/* Wait for work to finish and/or remove it */
>  	cancel_work_sync(&osb->dentry_lock_work);
> +	ocfs2_dec_mount_count();
>  out:
>  	kill_block_super(sb);
>  }

Why not put these calls in ocfs2_dlm_init() and ocfs2_dlm_shutdown() ?
	--Mark

--
Mark Fasheh

      reply	other threads:[~2013-09-09 21:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-06  3:29 [Ocfs2-devel] [PATCH 6/6] Disallow cluster_stack changes if fs are mounted Goldwyn Rodrigues
2013-09-09 21:54 ` Mark Fasheh [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130909215423.GF31381@wotan.suse.de \
    --to=mfasheh@suse.de \
    --cc=ocfs2-devel@oss.oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.