Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 220532
b: refs/heads/master
c: 015f021
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Layton authored and Trond Myklebust committed Oct 28, 2010
1 parent 2f62e7e commit aaa38aa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 568a810d7edd58bd505222dd1c7e48895532290b
refs/heads/master: 015f0212d51d85bd281a831639a769b4a1a3307a
8 changes: 7 additions & 1 deletion trunk/fs/nfs/pagelist.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ nfs_create_request(struct nfs_open_context *ctx, struct inode *inode,
if (req == NULL)
return ERR_PTR(-ENOMEM);

/* get lock context early so we can deal with alloc failures */
req->wb_lock_context = nfs_get_lock_context(ctx);
if (req->wb_lock_context == NULL) {
nfs_page_free(req);
return ERR_PTR(-ENOMEM);
}

/* Initialize the request struct. Initially, we assume a
* long write-back delay. This will be adjusted in
* update_nfs_request below if the region is not locked. */
Expand All @@ -79,7 +86,6 @@ nfs_create_request(struct nfs_open_context *ctx, struct inode *inode,
req->wb_pgbase = offset;
req->wb_bytes = count;
req->wb_context = get_nfs_open_context(ctx);
req->wb_lock_context = nfs_get_lock_context(ctx);
kref_init(&req->wb_kref);
return req;
}
Expand Down

0 comments on commit aaa38aa

Please sign in to comment.