1
0
Fork 0

NFS: Clean up nfs_create_request()

There is no point in looping if we're out of memory.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
hifive-unleashed-5.1
Trond Myklebust 2010-05-13 12:51:02 -04:00
parent 1f4c86c0be
commit 18eb884282
1 changed files with 4 additions and 10 deletions

View File

@ -60,16 +60,10 @@ nfs_create_request(struct nfs_open_context *ctx, struct inode *inode,
{ {
struct nfs_page *req; struct nfs_page *req;
for (;;) { /* try to allocate the request struct */
/* try to allocate the request struct */ req = nfs_page_alloc();
req = nfs_page_alloc(); if (req == NULL)
if (req != NULL) return ERR_PTR(-ENOMEM);
break;
if (fatal_signal_pending(current))
return ERR_PTR(-ERESTARTSYS);
yield();
}
/* Initialize the request struct. Initially, we assume a /* Initialize the request struct. Initially, we assume a
* long write-back delay. This will be adjusted in * long write-back delay. This will be adjusted in