[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170426184516.21784-1-fabf@skynet.be>
Date: Wed, 26 Apr 2017 20:45:16 +0200
From: Fabian Frederick <fabf@...net.be>
To: Trond Myklebust <trond.myklebust@...marydata.com>,
Anna Schumaker <anna.schumaker@...app.com>
Cc: linux-nfs@...r.kernel.org, linux-kernel@...r.kernel.org,
fabf@...net.be
Subject: [PATCH V2 linux-next] nfs: kmap can't fail
Remove NULL test on kmap()
Signed-off-by: Fabian Frederick <fabf@...net.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
Powered by blists - more mailing lists