diff options
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r-- | fs/nfs/write.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index f333848fd3be..dc62bc504693 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c | |||
@@ -584,13 +584,6 @@ static struct nfs_page * nfs_update_request(struct nfs_open_context* ctx, | |||
584 | /* Loop over all inode entries and see if we find | 584 | /* Loop over all inode entries and see if we find |
585 | * A request for the page we wish to update | 585 | * A request for the page we wish to update |
586 | */ | 586 | */ |
587 | if (new) { | ||
588 | if (radix_tree_preload(GFP_NOFS)) { | ||
589 | nfs_release_request(new); | ||
590 | return ERR_PTR(-ENOMEM); | ||
591 | } | ||
592 | } | ||
593 | |||
594 | spin_lock(&inode->i_lock); | 587 | spin_lock(&inode->i_lock); |
595 | req = nfs_page_find_request_locked(page); | 588 | req = nfs_page_find_request_locked(page); |
596 | if (req) { | 589 | if (req) { |
@@ -630,6 +623,10 @@ static struct nfs_page * nfs_update_request(struct nfs_open_context* ctx, | |||
630 | new = nfs_create_request(ctx, inode, page, offset, bytes); | 623 | new = nfs_create_request(ctx, inode, page, offset, bytes); |
631 | if (IS_ERR(new)) | 624 | if (IS_ERR(new)) |
632 | return new; | 625 | return new; |
626 | if (radix_tree_preload(GFP_NOFS)) { | ||
627 | nfs_release_request(new); | ||
628 | return ERR_PTR(-ENOMEM); | ||
629 | } | ||
633 | } | 630 | } |
634 | 631 | ||
635 | /* We have a request for our page. | 632 | /* We have a request for our page. |