[PATCH] splice: fix pipe_to_file() ->prepare_write() error path
authorJens Axboe <jens.axboe@oracle.com>
Wed, 11 Oct 2006 08:03:09 +0000 (10:03 +0200)
committerJens Axboe <axboe@nelson.home.kernel.dk>
Thu, 12 Oct 2006 13:08:51 +0000 (15:08 +0200)
Don't jump to the unlock+release path, we already did that.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
fs/splice.c

index 13e92dd19fbb1b9165f6cd05e02128c2a0a39cd8..a567010b62ac52e84099f584908629ceae806128 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;
 }