linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] block_dev : clean-up the code of thaw_bdev
@ 2015-05-04  9:22 tyeon
  0 siblings, 0 replies; only message in thread
From: tyeon @ 2015-05-04  9:22 UTC (permalink / raw)
  To: Alexander Viro; +Cc: linux-fsdevel

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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-05-04  9:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-04  9:22 [PATCH] block_dev : clean-up the code of thaw_bdev tyeon

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).