Skip to content

Commit

Permalink
[PATCH] splice: fix pipe_to_file() ->prepare_write() error path
Browse files Browse the repository at this point in the history
Don't jump to the unlock+release path, we already did that.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
  • Loading branch information
Jens Axboe authored and Jens Axboe committed Oct 12, 2006
1 parent a22b169 commit e6e80f2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fs/splice.c
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ static int pipe_to_file(struct pipe_inode_info *pipe, struct pipe_buffer *buf,
ret = -ENOMEM;
page = page_cache_alloc_cold(mapping);
if (unlikely(!page))
goto out_nomem;
goto out_ret;

/*
* This will also lock the page
Expand Down Expand Up @@ -666,7 +666,7 @@ static int pipe_to_file(struct pipe_inode_info *pipe, struct pipe_buffer *buf,
if (sd->pos + this_len > isize)
vmtruncate(mapping->host, isize);

goto out;
goto out_ret;
}

if (buf->page != page) {
Expand Down Expand Up @@ -698,7 +698,7 @@ static int pipe_to_file(struct pipe_inode_info *pipe, struct pipe_buffer *buf,
out:
page_cache_release(page);
unlock_page(page);
out_nomem:
out_ret:
return ret;
}

Expand Down

0 comments on commit e6e80f2

Please sign in to comment.