From mboxrd@z Thu Jan 1 00:00:00 1970 From: domen@coderock.org Subject: [patch 4/7] fs/clntproc: replace schedule_timeout() with msleep_interruptible() Date: Mon, 20 Jun 2005 23:57:03 +0200 Message-ID: <20050620215702.999768000@nd47.coderock.org> Cc: linux-fsdevel@vger.kernel.org, Nishanth Aravamudan , domen@coderock.org Return-path: Received: from coderock.org ([193.77.147.115]:19867 "EHLO trashy.coderock.org") by vger.kernel.org with ESMTP id S262253AbVFTWE6 (ORCPT ); Mon, 20 Jun 2005 18:04:58 -0400 To: viro@parcelfarce.linux.theplanet.co.uk Content-Disposition: inline; filename=msleep_interruptible-fs_lockd_clntproc.patch Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org From: Nishanth Aravamudan Use msleep_interruptible() instead of schedule_timeout(). The existing code is not incorrect, but msleep_interruptible() offers two advantages: 1) consistency across the kernel and 2) human-sensible time units (msecs). Signed-off-by: Nishanth Aravamudan Signed-off-by: Domen Puncer --- clntproc.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: quilt/fs/lockd/clntproc.c =================================================================== --- quilt.orig/fs/lockd/clntproc.c +++ quilt/fs/lockd/clntproc.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -298,8 +299,7 @@ nlmclnt_alloc_call(void) return call; } printk("nlmclnt_alloc_call: failed, waiting for memory\n"); - current->state = TASK_INTERRUPTIBLE; - schedule_timeout(5*HZ); + msleep_interruptible(5000); } return NULL; } --