Skip to content

Commit

Permalink
NFS: don't expect errors from mempool_alloc().
Browse files Browse the repository at this point in the history
Commit fbe77c3 ("NFS: move rw_mode to nfs_pageio_header")
reintroduced some pointless code that commit 518662e ("NFS: fix
usage of mempools.") had recently removed.

Remove it again.

Cc: Benjamin Coddington <[email protected]>
Signed-off-by: NeilBrown <[email protected]>
Signed-off-by: Trond Myklebust <[email protected]>
  • Loading branch information
NeilBrown authored and trondmypd committed Sep 6, 2017
1 parent 9590d08 commit 237f830
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions fs/nfs/write.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 237f830

Please sign in to comment.