diff options
| -rw-r--r-- | fs/nfs/pagelist.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c index d846d39a31ef..fe90130bd7a9 100644 --- a/fs/nfs/pagelist.c +++ b/fs/nfs/pagelist.c | |||
| @@ -51,9 +51,7 @@ nfs_page_free(struct nfs_page *p) | |||
| 51 | * @count: number of bytes to read/write | 51 | * @count: number of bytes to read/write |
| 52 | * | 52 | * |
| 53 | * The page must be locked by the caller. This makes sure we never | 53 | * The page must be locked by the caller. This makes sure we never |
| 54 | * create two different requests for the same page, and avoids | 54 | * create two different requests for the same page. |
| 55 | * a possible deadlock when we reach the hard limit on the number | ||
| 56 | * of dirty pages. | ||
| 57 | * User should ensure it is safe to sleep in this function. | 55 | * User should ensure it is safe to sleep in this function. |
| 58 | */ | 56 | */ |
| 59 | struct nfs_page * | 57 | struct nfs_page * |
| @@ -64,16 +62,12 @@ nfs_create_request(struct nfs_open_context *ctx, struct inode *inode, | |||
| 64 | struct nfs_server *server = NFS_SERVER(inode); | 62 | struct nfs_server *server = NFS_SERVER(inode); |
| 65 | struct nfs_page *req; | 63 | struct nfs_page *req; |
| 66 | 64 | ||
| 67 | /* Deal with hard limits. */ | ||
| 68 | for (;;) { | 65 | for (;;) { |
| 69 | /* try to allocate the request struct */ | 66 | /* try to allocate the request struct */ |
| 70 | req = nfs_page_alloc(); | 67 | req = nfs_page_alloc(); |
| 71 | if (req != NULL) | 68 | if (req != NULL) |
| 72 | break; | 69 | break; |
| 73 | 70 | ||
| 74 | /* Try to free up at least one request in order to stay | ||
| 75 | * below the hard limit | ||
| 76 | */ | ||
| 77 | if (signalled() && (server->flags & NFS_MOUNT_INTR)) | 71 | if (signalled() && (server->flags & NFS_MOUNT_INTR)) |
| 78 | return ERR_PTR(-ERESTARTSYS); | 72 | return ERR_PTR(-ERESTARTSYS); |
| 79 | yield(); | 73 | yield(); |
