diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-05-13 12:51:02 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-05-14 15:09:34 -0400 |
commit | 18eb884282bbaf99700ba5b60ded782807d52408 (patch) | |
tree | acdea072568b715ca56873df774e1402a882a890 /fs/nfs/pagelist.c | |
parent | 1f4c86c0be9064ab4eebd9e67c84606c1cfeec4b (diff) | |
download | linux-stable-18eb884282bbaf99700ba5b60ded782807d52408.tar.gz linux-stable-18eb884282bbaf99700ba5b60ded782807d52408.tar.bz2 linux-stable-18eb884282bbaf99700ba5b60ded782807d52408.zip |
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>
Diffstat (limited to 'fs/nfs/pagelist.c')
-rw-r--r-- | fs/nfs/pagelist.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c index 29d9d36cd5f4..a3654e57b589 100644 --- a/fs/nfs/pagelist.c +++ b/fs/nfs/pagelist.c @@ -60,16 +60,10 @@ nfs_create_request(struct nfs_open_context *ctx, struct inode *inode, { struct nfs_page *req; - for (;;) { - /* try to allocate the request struct */ - req = nfs_page_alloc(); - if (req != NULL) - break; - - if (fatal_signal_pending(current)) - return ERR_PTR(-ERESTARTSYS); - yield(); - } + /* try to allocate the request struct */ + req = nfs_page_alloc(); + if (req == NULL) + return ERR_PTR(-ENOMEM); /* Initialize the request struct. Initially, we assume a * long write-back delay. This will be adjusted in |