All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mingming Cao <cmm@us.ibm.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: ext4 development <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH] missing journal_stop in ext4_da_write_begin error case
Date: Thu, 31 Jul 2008 11:09:45 -0700	[thread overview]
Message-ID: <1217527785.6317.10.camel@mingming-laptop> (raw)
In-Reply-To: <4891F527.4060007@redhat.com>


在 2008-07-31四的 12:23 -0500,Eric Sandeen写道:
> ext4_da_write_begin needs to call journal_stop before returning,
> if the page allocation fails.
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Ackd-by: Mingming Cao <cmm@us.ibm.com>

> ---
> 
> Index: linux-2.6/fs/ext4/inode.c
> ===================================================================
> --- linux-2.6.orig/fs/ext4/inode.c	2008-07-29 17:18:26.000000000 -0500
> +++ linux-2.6/fs/ext4/inode.c	2008-07-31 12:21:03.866229084 -0500
> @@ -2280,8 +2280,11 @@ retry:
>  	}
> 
>  	page = __grab_cache_page(mapping, index);
> -	if (!page)
> -		return -ENOMEM;
> +	if (!page) {
> +		ext4_journal_stop(handle);
> +		ret = -ENOMEM;
> +		goto out;
> +	}
>  	*pagep = page;
> 
>  	ret = block_write_begin(file, mapping, pos, len, flags, pagep, fsdata,
> 
> --
> 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

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

      reply	other threads:[~2008-07-31 18:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-31 17:23 [PATCH] missing journal_stop in ext4_da_write_begin error case Eric Sandeen
2008-07-31 18:09 ` Mingming Cao [this message]

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=1217527785.6317.10.camel@mingming-laptop \
    --to=cmm@us.ibm.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sandeen@redhat.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.