linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: tyeon <tom.yeon@windriver.com>
To: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: <linux-fsdevel@vger.kernel.org>
Subject: [PATCH] block_dev : clean-up the code of thaw_bdev
Date: Mon, 4 May 2015 18:22:09 +0900	[thread overview]
Message-ID: <55473A41.5000506@windriver.com> (raw)

the code in the "if (error) {" statment is duplicated with the last
statment at the end of function.
simply remove the mutex_unlock statement and return statement in there.

Signed-off-by: Tom(JeHyeon) Yeon <tom.yeon@windriver.com>
---
  fs/block_dev.c |    9 ++++-----
  1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/fs/block_dev.c b/fs/block_dev.c
index 975266b..01676ca 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -271,14 +271,13 @@ int thaw_bdev(struct block_device *bdev, struct 
super_block *sb)
  		error = sb->s_op->thaw_super(sb);
  	else
  		error = thaw_super(sb);
-	if (error) {
+
+	if (error)
  		bdev->bd_fsfreeze_count++;
-		mutex_unlock(&bdev->bd_fsfreeze_mutex);
-		return error;
-	}
+
  out:
  	mutex_unlock(&bdev->bd_fsfreeze_mutex);
-	return 0;
+	return error;
  }
  EXPORT_SYMBOL(thaw_bdev);

-- 
1.7.9.5

                 reply	other threads:[~2015-05-04  9:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=55473A41.5000506@windriver.com \
    --to=tom.yeon@windriver.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).