From: Vyacheslav Dubeyko <slava@dubeyko.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Linux FS devel list <linux-fsdevel@vger.kernel.org>,
Al Viro <viro@zeniv.linux.org.uk>,
ChristophHellwig <hch@infradead.org>,
Hin-Tak Leung <htl10@users.sourceforge.net>
Subject: Re: [PATCH v2 14/15] hfsplus: implement replay journal functionality
Date: Wed, 05 Feb 2014 11:50:16 +0400 [thread overview]
Message-ID: <1391586616.2590.11.camel@ubuntu> (raw)
In-Reply-To: <20140204143301.a2c0cbe9ba5957cc86a2b1a6@linux-foundation.org>
Hi Andrew,
On Tue, 2014-02-04 at 14:33 -0800, Andrew Morton wrote:
> On Fri, 24 Jan 2014 19:28:56 +0400 Vyacheslav Dubeyko <slava@dubeyko.com> wrote:
>
> > From: Vyacheslav Dubeyko <slava@dubeyko.com>
> > Subject: [PATCH v2 14/15] hfsplus: implement replay journal functionality
> >
> > This patch implements functionality of HFS+ journal replay.
> >
> > If the journal contains valid transaction then it needs to write
> > them to disk. In order to replay the journal, an implementation
> > just loops over the transactions, copying each individual block
> > in the transaction from the journal to its proper location on
> > the volume. Once those blocks have been flushed to the media
> > (not just the driver!), it may update the journal header to
> > remove the transactions.
> >
> > ...
> >
> > +static int hfsplus_replay_journal(struct super_block *sb)
> > +{
> > + struct hfsplus_journal *jnl = HFSPLUS_SB(sb)->jnl;
> > + struct hfsplus_journal_header *jh = jnl->jh;
> > + struct hfsplus_blist_desc desc;
> > + u32 last_seq_num = 0;
> > + int err;
> > +
> >
> > ...
> >
> > + if (hfsplus_journal_empty(jh))
> > + err = hfsplus_replay_journal_header(sb);
> > + else {
> > + pr_err("journal replay failed\n");
> > + err = -EIO;
> > + }
> > +
> > + if (unlikely(err))
> > + goto failed_journal_replay;
> > +
> > + mutex_unlock(&jnl->jnl_lock);
> > + hfsplus_deinit_block_list_desc(&desc);
> > + return 0;
>
> umm, remove the above five statements?
>
> > +failed_journal_replay:
> > + mutex_unlock(&jnl->jnl_lock);
> > + hfsplus_deinit_block_list_desc(&desc);
> > + return err;
> > +}
Yes, I agree. Please, find the patch below.
Thanks,
Vyacheslav Dubeyko.
--
From: Vyacheslav Dubeyko <slava@dubeyko.com>
Subject: [PATCH] hfsplus: remove unnecessary duplication of cleanup in hfsplus_replay_journal() method
This patch simply remove unnecessary duplication of cleanup
in hfsplus_replay_journal() method.
Signed-off-by: Vyacheslav Dubeyko <slava@dubeyko.com>
Cc: Hin-Tak Leung <htl10@users.sourceforge.net>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@infradead.org>
---
fs/hfsplus/journal.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/fs/hfsplus/journal.c b/fs/hfsplus/journal.c
index 720d96a..93c1d6f 100644
--- a/fs/hfsplus/journal.c
+++ b/fs/hfsplus/journal.c
@@ -947,13 +947,6 @@ static int hfsplus_replay_journal(struct super_block *sb)
err = -EIO;
}
- if (unlikely(err))
- goto failed_journal_replay;
-
- mutex_unlock(&jnl->jnl_lock);
- hfsplus_deinit_block_list_desc(&desc);
- return 0;
-
failed_journal_replay:
mutex_unlock(&jnl->jnl_lock);
hfsplus_deinit_block_list_desc(&desc);
--
1.7.9.5
next prev parent reply other threads:[~2014-02-05 7:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-24 15:28 [PATCH v2 14/15] hfsplus: implement replay journal functionality Vyacheslav Dubeyko
2014-02-04 22:33 ` Andrew Morton
2014-02-05 7:50 ` Vyacheslav Dubeyko [this message]
2014-02-05 11:19 ` Hin-Tak Leung
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=1391586616.2590.11.camel@ubuntu \
--to=slava@dubeyko.com \
--cc=akpm@linux-foundation.org \
--cc=hch@infradead.org \
--cc=htl10@users.sourceforge.net \
--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).