All of lore.kernel.org
 help / color / mirror / Atom feed
From: Liu Bo <liubo2009@cn.fujitsu.com>
To: Sergei Trofimovich <slyich@gmail.com>
Cc: linux-btrfs@vger.kernel.org,
	Sergei Trofimovich <slyfox@gentoo.org>,
	Jeff Mahoney <jeffm@suse.com>,
	Chris Mason <chris.mason@oracle.com>,
	Josef Bacik <josef@redhat.com>
Subject: Re: [PATCH] btrfs: fix early abort in 'remount'
Date: Mon, 16 Apr 2012 09:12:52 +0800	[thread overview]
Message-ID: <4F8B7214.5010702@cn.fujitsu.com> (raw)
In-Reply-To: <1334529975-13289-1-git-send-email-slyich@gmail.com>

On 04/16/2012 06:46 AM, Sergei Trofimovich wrote:

> From: Sergei Trofimovich <slyfox@gentoo.org>
> 
> Cc: Jeff Mahoney <jeffm@suse.com>
> Cc: Chris Mason <chris.mason@oracle.com>
> Cc: Josef Bacik <josef@redhat.com>
> Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
> ---
>  fs/btrfs/super.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
> index 8d5d380..0b296f2 100644
> --- a/fs/btrfs/super.c
> +++ b/fs/btrfs/super.c
> @@ -1149,12 +1149,16 @@ static int btrfs_remount(struct super_block *sb, int *flags, char *data)
>  			goto restore;
>  	} else {
>  		if (fs_info->fs_devices->rw_devices == 0)
> +		{
>  			ret = -EACCES;
>  			goto restore;
> +		}
>  
>  		if (btrfs_super_log_root(fs_info->super_copy) != 0)
> +		{
>  			ret = -EINVAL;
>  			goto restore;
> +		}
>  
>  		ret = btrfs_cleanup_fs_roots(fs_info);
>  		if (ret)


I prefer to
if (xxx) {
	yyy;
}

thanks, 
liubo 

  reply	other threads:[~2012-04-16  1:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-15 22:46 [PATCH] btrfs: fix early abort in 'remount' Sergei Trofimovich
2012-04-16  1:12 ` Liu Bo [this message]
2012-04-16  3:44   ` [PATCH v2] " Sergei Trofimovich
2012-04-16 11:52     ` Sergey V.
2012-04-16 13:55     ` Josef Bacik

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=4F8B7214.5010702@cn.fujitsu.com \
    --to=liubo2009@cn.fujitsu.com \
    --cc=chris.mason@oracle.com \
    --cc=jeffm@suse.com \
    --cc=josef@redhat.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=slyfox@gentoo.org \
    --cc=slyich@gmail.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.