diff mbox

[2/2] Jbd: fix a bug of leaking jh->b_jcount

Message ID 1306318841-8363-1-git-send-email-dingdinghua@nrchpc.ac.cn
State Not Applicable, archived
Headers show

Commit Message

dingdinghua May 25, 2011, 10:20 a.m. UTC
drop jh->b_jcount in error path
---
 fs/jbd/transaction.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Yongqiang Yang May 25, 2011, 11:37 a.m. UTC | #1
Hi,

m/N means that there are N patches and this patch is the mst one. e.g.
2/30 means the patch series contain 30 patches and this is the 2nd
one.

When a patch is resent, you'd better send it with [PACH vm], where m
is the version number.

Again, you missed Signed-off-by: line.

On Wed, May 25, 2011 at 6:20 PM, Ding Dinghua <dingdinghua@nrchpc.ac.cn> wrote:
> drop jh->b_jcount in error path
> ---
>  fs/jbd/transaction.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/jbd/transaction.c b/fs/jbd/transaction.c
> index 60d2319..3f7bf84 100644
> --- a/fs/jbd/transaction.c
> +++ b/fs/jbd/transaction.c
> @@ -843,8 +843,8 @@ int journal_get_create_access(handle_t *handle, struct buffer_head *bh)
>         */
>        JBUFFER_TRACE(jh, "cancelling revoke");
>        journal_cancel_revoke(handle, jh);
> -       journal_put_journal_head(jh);
>  out:
> +       journal_put_journal_head(jh);
>        return err;
>  }
>
> --
> 1.7.4.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
Yongqiang Yang May 25, 2011, 11:47 a.m. UTC | #2
On Wed, May 25, 2011 at 7:37 PM, Yongqiang Yang <xiaoqiangnk@gmail.com> wrote:
> Hi,
>
> m/N means that there are N patches and this patch is the mst one. e.g.
> 2/30 means the patch series contain 30 patches and this is the 2nd
> one.
>
> When a patch is resent, you'd better send it with [PACH vm], where m
> is the version number.
Sorry,  two patches are different, please ignore comments above.
>
> Again, you missed Signed-off-by: line.
>
> On Wed, May 25, 2011 at 6:20 PM, Ding Dinghua <dingdinghua@nrchpc.ac.cn> wrote:
>> drop jh->b_jcount in error path
>> ---
>>  fs/jbd/transaction.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/fs/jbd/transaction.c b/fs/jbd/transaction.c
>> index 60d2319..3f7bf84 100644
>> --- a/fs/jbd/transaction.c
>> +++ b/fs/jbd/transaction.c
>> @@ -843,8 +843,8 @@ int journal_get_create_access(handle_t *handle, struct buffer_head *bh)
>>         */
>>        JBUFFER_TRACE(jh, "cancelling revoke");
>>        journal_cancel_revoke(handle, jh);
>> -       journal_put_journal_head(jh);
>>  out:
>> +       journal_put_journal_head(jh);
>>        return err;
>>  }
>>
>> --
>> 1.7.4.1
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>
>
>
> --
> Best Wishes
> Yongqiang Yang
>
Theodore Ts'o May 25, 2011, 1:48 p.m. UTC | #3
On Wed, May 25, 2011 at 07:47:14PM +0800, Yongqiang Yang wrote:
> On Wed, May 25, 2011 at 7:37 PM, Yongqiang Yang <xiaoqiangnk@gmail.com> wrote:
> > Hi,
> >
> > m/N means that there are N patches and this patch is the mst one. e.g.
> > 2/30 means the patch series contain 30 patches and this is the 2nd
> > one.
> >
> > When a patch is resent, you'd better send it with [PACH vm], where m
> > is the version number.
> Sorry,  two patches are different, please ignore comments above.

... and this is why it's a REALLY GOOD IDEA to make patch 2/2 have a
In-Reply-To: header that references the message id of patch 1/2.  It
avoids this sort of confusion.

And again, git format-patch and git send-email will do all of this
automatically for you...

						- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/jbd/transaction.c b/fs/jbd/transaction.c
index 60d2319..3f7bf84 100644
--- a/fs/jbd/transaction.c
+++ b/fs/jbd/transaction.c
@@ -843,8 +843,8 @@  int journal_get_create_access(handle_t *handle, struct buffer_head *bh)
 	 */
 	JBUFFER_TRACE(jh, "cancelling revoke");
 	journal_cancel_revoke(handle, jh);
-	journal_put_journal_head(jh);
 out:
+	journal_put_journal_head(jh);
 	return err;
 }