]> git.hungrycats.org Git - linux/commitdiff
[PATCH] splice: fix pipe_to_file() ->prepare_write() error path
authorJens Axboe <jens.axboe@oracle.com>
Thu, 12 Oct 2006 05:59:47 +0000 (07:59 +0200)
committerChris Wright <chrisw@sous-sol.org>
Sat, 4 Nov 2006 01:33:44 +0000 (17:33 -0800)
Don't jump to the unlock+release path, we already did that.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
fs/splice.c

index 684bca3d3a107c021715f8394a1f1d23a1913aaa..4eed2f6c8eeb812921a3a047d996da6cb77742f7 100644 (file)
@@ -607,7 +607,7 @@ find_page:
                        ret = -ENOMEM;
                        page = page_cache_alloc_cold(mapping);
                        if (unlikely(!page))
-                               goto out_nomem;
+                               goto out_ret;
 
                        /*
                         * This will also lock the page
@@ -666,7 +666,7 @@ find_page:
                if (sd->pos + this_len > isize)
                        vmtruncate(mapping->host, isize);
 
-               goto out;
+               goto out_ret;
        }
 
        if (buf->page != page) {
@@ -698,7 +698,7 @@ find_page:
 out:
        page_cache_release(page);
        unlock_page(page);
-out_nomem:
+out_ret:
        return ret;
 }