Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1631667
| From | Fabian Frederick <fabf@skynet.be> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH V2 linux-next] nfs: kmap can't fail |
| Date | 2017-04-26 20:50 +0200 |
| Message-ID | <tAAaJ-64N-9@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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
--
2.9.3
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH V2 linux-next] nfs: kmap can't fail Fabian Frederick <fabf@skynet.be> - 2017-04-26 20:50 +0200 Re: [PATCH V2 linux-next] nfs: kmap can't fail Trond Myklebust <trondmy@primarydata.com> - 2017-04-26 21:10 +0200
csiph-web