From: NeilBrown Date: Fri, 18 Aug 2017 07:12:51 +0000 (+1000) Subject: NFS: don't expect errors from mempool_alloc(). X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=237f8306c30206d997e265ff46652e602a50824f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git NFS: don't expect errors from mempool_alloc(). Commit fbe77c30e9ab ("NFS: move rw_mode to nfs_pageio_header") reintroduced some pointless code that commit 518662e0fcb9 ("NFS: fix usage of mempools.") had recently removed. Remove it again. Cc: Benjamin Coddington Signed-off-by: NeilBrown Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 1a877d17e6cb..ae26775b5448 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -102,10 +102,8 @@ static struct nfs_pgio_header *nfs_writehdr_alloc(void) { struct nfs_pgio_header *p = mempool_alloc(nfs_wdata_mempool, GFP_NOIO); - if (p) { - memset(p, 0, sizeof(*p)); - p->rw_mode = FMODE_WRITE; - } + memset(p, 0, sizeof(*p)); + p->rw_mode = FMODE_WRITE; return p; }