All of lore.kernel.org
 help / color / mirror / Atom feed
From: Prasad Joshi <prasadjoshi.linux@gmail.com>
To: Younger Liu <younger.liu@huawei.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	joern@logfs.org, logfs@logfs.org,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Subject: Re: [RESENT PATCH] logfs: Check for the return value after calling find_or_create_page()
Date: Wed, 17 Jul 2013 09:53:48 +0530	[thread overview]
Message-ID: <CALJbWepVigV_sAcBGY-9Z+A+p4hOnQdPAJgpF4OMQzZoFHkJkQ@mail.gmail.com> (raw)
In-Reply-To: <51E51353.3060501@huawei.com>

On Tue, Jul 16, 2013 at 3:03 PM, Younger Liu <younger.liu@huawei.com> wrote:
>
> In get_mapping_page(), after calling find_or_create_page(),
> the return value should be checked.
>
> Signed-off-by: Younger Liu <younger.liu@huawei.com>

Thanks applied.

Regards,
Prasad

> ---
>  fs/logfs/segment.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/fs/logfs/segment.c b/fs/logfs/segment.c
> index 038da09..2641e94 100644
> --- a/fs/logfs/segment.c
> +++ b/fs/logfs/segment.c
> @@ -62,7 +62,8 @@ static struct page *get_mapping_page(struct super_block
> *sb, pgoff_t index,
>                 page = read_cache_page(mapping, index, filler, sb);
>         else {
>                 page = find_or_create_page(mapping, index, GFP_NOFS);
> -               unlock_page(page);
> +               if(page)
> +                       unlock_page(page);
>         }
>         return page;
>  }
> -- 1.7.9.7
>

  reply	other threads:[~2013-07-17  4:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-16  9:33 [RESENT PATCH] logfs: Check for the return value after calling find_or_create_page() Younger Liu
2013-07-17  4:23 ` Prasad Joshi [this message]
2013-07-18 12:02   ` Vyacheslav Dubeyko
2013-07-23  9:11     ` Younger Liu
2013-09-18  3:48   ` Younger Liu
2013-12-11 11:29 Younger Liu

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=CALJbWepVigV_sAcBGY-9Z+A+p4hOnQdPAJgpF4OMQzZoFHkJkQ@mail.gmail.com \
    --to=prasadjoshi.linux@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=joern@logfs.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=logfs@logfs.org \
    --cc=younger.liu@huawei.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.