Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e6e80f29 authored by Jens Axboe's avatar Jens Axboe Committed by Jens Axboe
Browse files

[PATCH] splice: fix pipe_to_file() ->prepare_write() error path



Don't jump to the unlock+release path, we already did that.

Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
parent a22b169d
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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
@@ -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) {
@@ -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;
}