[Ocfs2-tools-devel] [PATCH 1/1] Two minor fix in tunefs.ocfs2.

Joel Becker Joel.Becker at oracle.com
Tue Nov 6 13:09:35 PST 2007


On Tue, Nov 06, 2007 at 05:06:21PM +0800, Tao Ma wrote:
> 1. Remove the unused "fd" in ocfs2_tune_opts.
> 2. Add the sanity check for io_destroy_cache.
> 
> Signed-off-by: Tao Ma <tao.ma at oracle.com>

Signed-off-by: Joel Becker <joel.becker at oracle.com>

> ---
>  tunefs.ocfs2/tunefs.c |    3 ++-
>  tunefs.ocfs2/tunefs.h |    1 -
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tunefs.ocfs2/tunefs.c b/tunefs.ocfs2/tunefs.c
> index cf01110..76cd473 100644
> --- a/tunefs.ocfs2/tunefs.c
> +++ b/tunefs.ocfs2/tunefs.c
> @@ -1723,7 +1723,8 @@ unlock:
>  	block_signals(SIG_UNBLOCK);
>  
>  close:
> -	io_destroy_cache(fs->fs_io);
> +	if (fs && fs->fs_io)
> +		io_destroy_cache(fs->fs_io);
>  	block_signals(SIG_BLOCK);
>  	if (fs && fs->fs_dlm_ctxt)
>  		ocfs2_shutdown_dlm(fs);
> diff --git a/tunefs.ocfs2/tunefs.h b/tunefs.ocfs2/tunefs.h
> index 23bab70..3124b76 100644
> --- a/tunefs.ocfs2/tunefs.h
> +++ b/tunefs.ocfs2/tunefs.h
> @@ -96,7 +96,6 @@ typedef struct _ocfs2_tune_opts {
>  	fs_options clear_feature;
>  	char *feature_string;
>  	time_t tune_time;
> -	int fd;
>  } ocfs2_tune_opts;
>  
>  void print_query(char *queryfmt);
> -- 
> 1.5.3.2.g4f337
> 
> _______________________________________________
> Ocfs2-tools-devel mailing list
> Ocfs2-tools-devel at oss.oracle.com
> http://oss.oracle.com/mailman/listinfo/ocfs2-tools-devel

-- 

A good programming language should have features that make the
kind of people who use the phrase "software engineering" shake
their heads disapprovingly.
	- Paul Graham

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127



More information about the Ocfs2-tools-devel mailing list