From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755507Ab0F2LJX (ORCPT ); Tue, 29 Jun 2010 07:09:23 -0400 Received: from fxip-0047f.externet.hu ([88.209.222.127]:48317 "EHLO pomaz-ex.szeredi.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755232Ab0F2LJW (ORCPT ); Tue, 29 Jun 2010 07:09:22 -0400 To: Jens Axboe CC: xiaosuo@gmail.com, tim.gardner@canonical.com, torvalds@linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org In-reply-to: (message from Miklos Szeredi on Tue, 29 Jun 2010 13:08:12 +0200) Subject: [PATCH 1/3] splice: direct_splice_actor() should not use pos in sd References: Message-Id: From: Miklos Szeredi Date: Tue, 29 Jun 2010 13:09:18 +0200 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Changli Gao direct_splice_actor() shouldn't use sd->pos, as sd->pos is for file reading, file->f_pos should be used instead. Signed-off-by: Changli Gao Signed-off-by: Miklos Szeredi ---- fs/splice.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Index: linux-2.6/fs/splice.c =================================================================== --- linux-2.6.orig/fs/splice.c 2010-06-29 12:46:27.000000000 +0200 +++ linux-2.6/fs/splice.c 2010-06-29 12:46:28.000000000 +0200 @@ -1282,7 +1282,8 @@ static int direct_splice_actor(struct pi { struct file *file = sd->u.file; - return do_splice_from(pipe, file, &sd->pos, sd->total_len, sd->flags); + return do_splice_from(pipe, file, &file->f_pos, sd->total_len, + sd->flags); } /**