From: Greg Kroah-Hartman Date: Mon, 17 Jul 2006 15:10:59 +0000 (-0700) Subject: fix splice patch as it needed to actually build on 2.6.17.y... X-Git-Tag: v2.6.17.7~2^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0c25ce878b7497bf5507ce2839ddbe2925ef3211;p=thirdparty%2Fkernel%2Fstable-queue.git fix splice patch as it needed to actually build on 2.6.17.y... --- diff --git a/queue-2.6.17/splice-fix-problems-with-sys_tee.patch b/queue-2.6.17/splice-fix-problems-with-sys_tee.patch index c07963c5865..d463df6df3a 100644 --- a/queue-2.6.17/splice-fix-problems-with-sys_tee.patch +++ b/queue-2.6.17/splice-fix-problems-with-sys_tee.patch @@ -16,11 +16,11 @@ Several issues noticed/fixed: Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- - fs/splice.c | 238 +++++++++++++++++++++++++++++++++--------------------------- - 1 file changed, 133 insertions(+), 105 deletions(-) + fs/splice.c | 230 +++++++++++++++++++++++++++++++++--------------------------- + 1 file changed, 129 insertions(+), 101 deletions(-) ---- linux-2.6.17.4.orig/fs/splice.c -+++ linux-2.6.17.4/fs/splice.c +--- linux-2.6.17.6.orig/fs/splice.c ++++ linux-2.6.17.6/fs/splice.c @@ -1295,6 +1295,85 @@ asmlinkage long sys_splice(int fd_in, lo } @@ -118,20 +118,16 @@ Signed-off-by: Greg Kroah-Hartman /* * Potential ABBA deadlock, work around it by ordering lock -@@ -1312,126 +1389,62 @@ static int link_pipe(struct pipe_inode_i +@@ -1312,7 +1389,6 @@ static int link_pipe(struct pipe_inode_i * could deadlock (one doing tee from A -> B, the other from B -> A). */ if (ipipe->inode < opipe->inode) { - ipipe_first = 1; -- mutex_lock(&ipipe->inode->i_mutex); -- mutex_lock(&opipe->inode->i_mutex); -+ mutex_lock_nested(&ipipe->inode->i_mutex, I_MUTEX_PARENT); -+ mutex_lock_nested(&opipe->inode->i_mutex, I_MUTEX_CHILD); + mutex_lock(&ipipe->inode->i_mutex); + mutex_lock(&opipe->inode->i_mutex); } else { -- mutex_lock(&opipe->inode->i_mutex); -- mutex_lock(&ipipe->inode->i_mutex); -+ mutex_lock_nested(&opipe->inode->i_mutex, I_MUTEX_PARENT); -+ mutex_lock_nested(&ipipe->inode->i_mutex, I_MUTEX_CHILD); +@@ -1320,118 +1396,55 @@ static int link_pipe(struct pipe_inode_i + mutex_lock(&ipipe->inode->i_mutex); } - for (i = 0;; i++) {