All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anna Schumaker <Anna.Schumaker@Netapp.com>
To: Fabian Frederick <fabf@skynet.be>,
	Trond Myklebust <trond.myklebust@primarydata.com>
Cc: <linux-nfs@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1 linux-next] nfs: kmap can't fail
Date: Tue, 25 Apr 2017 16:37:08 -0400	[thread overview]
Message-ID: <2158af9c-96c7-c124-38c6-3779fbaf373b@Netapp.com> (raw)
In-Reply-To: <20170425181033.1892-1-fabf@skynet.be>

Hi Fabian,

On 04/25/2017 02:10 PM, Fabian Frederick wrote:
> Remove NULL test on kmap()
> 
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
> ---
>  fs/nfs/dir.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
> index 3a188cb..f89e54c 100644
> --- a/fs/nfs/dir.c
> +++ b/fs/nfs/dir.c
> @@ -179,8 +179,6 @@ struct nfs_cache_array *nfs_readdir_get_array(struct page *page)
>  	if (page == NULL)
>  		return ERR_PTR(-EIO);
>  	ptr = kmap(page);
> -	if (ptr == NULL)
> -		return ERR_PTR(-ENOMEM);>  	return ptr;

While you're at it, can you remove the ptr variable entirely and change the code to "return kmap(page)" instead?

Thanks,
Anna

>  }
>  
> 

      reply	other threads:[~2017-04-25 20:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-25 18:10 [PATCH 1/1 linux-next] nfs: kmap can't fail Fabian Frederick
2017-04-25 20:37 ` Anna Schumaker [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=2158af9c-96c7-c124-38c6-3779fbaf373b@Netapp.com \
    --to=anna.schumaker@netapp.com \
    --cc=fabf@skynet.be \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@primarydata.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.