From: Trond Myklebust <trondmy@primarydata.com>
To: "anna.schumaker@netapp.com" <anna.schumaker@netapp.com>,
Trond Myklebust <trondmy@primarydata.com>,
"fabf@skynet.be" <fabf@skynet.be>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH V2 linux-next] nfs: kmap can't fail
Date: Wed, 26 Apr 2017 19:05:02 +0000 [thread overview]
Message-ID: <1493233499.2326.1.camel@primarydata.com> (raw)
In-Reply-To: <20170426184516.21784-1-fabf@skynet.be>
On Wed, 2017-04-26 at 20:45 +0200, Fabian Frederick wrote:
> Remove NULL test on kmap()
>
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
> ---
> V2: Remove ptr and return kmap(page) directly
> (Suggested by Anna Schumaker)
>
> fs/nfs/dir.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
> index 3a188cb..12ed806b 100644
> --- a/fs/nfs/dir.c
> +++ b/fs/nfs/dir.c
> @@ -175,13 +175,9 @@ typedef struct {
> static
> struct nfs_cache_array *nfs_readdir_get_array(struct page *page)
> {
> - void *ptr;
> if (page == NULL)
> return ERR_PTR(-EIO);
> - ptr = kmap(page);
> - if (ptr == NULL)
> - return ERR_PTR(-ENOMEM);
> - return ptr;
> + return kmap(page);
> }
>
> static
There seems little value in having a wrapper to kmap... Can we perhaps
instead just get rid of both nfs_readdir_get_array and
nfs_readdir_release_array?
--
Trond Myklebust
Linux NFS client maintainer, PrimaryData
trond.myklebust@primarydata.com
prev parent reply other threads:[~2017-04-26 19:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-26 18:45 [PATCH V2 linux-next] nfs: kmap can't fail Fabian Frederick
2017-04-26 19:05 ` Trond Myklebust [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=1493233499.2326.1.camel@primarydata.com \
--to=trondmy@primarydata.com \
--cc=anna.schumaker@netapp.com \
--cc=fabf@skynet.be \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
/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