* [PATCH 1/1 linux-next] nfs: kmap can't fail
@ 2017-04-25 18:10 Fabian Frederick
2017-04-25 20:37 ` Anna Schumaker
0 siblings, 1 reply; 2+ messages in thread
From: Fabian Frederick @ 2017-04-25 18:10 UTC (permalink / raw)
To: Trond Myklebust, Anna Schumaker; +Cc: linux-nfs, linux-kernel, fabf
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;
}
--
2.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1 linux-next] nfs: kmap can't fail
2017-04-25 18:10 [PATCH 1/1 linux-next] nfs: kmap can't fail Fabian Frederick
@ 2017-04-25 20:37 ` Anna Schumaker
0 siblings, 0 replies; 2+ messages in thread
From: Anna Schumaker @ 2017-04-25 20:37 UTC (permalink / raw)
To: Fabian Frederick, Trond Myklebust; +Cc: linux-nfs, linux-kernel
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
> }
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-04-25 20:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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.