From: Jim Garlick Date: Tue, 3 Jan 2012 21:27:50 +0000 (-0600) Subject: fs/9p: check schedule_timeout_interruptible return value X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a0ea787b027b79cf2e01c6758e5246db06520158;p=mv-sheeva.git fs/9p: check schedule_timeout_interruptible return value In v9fs_file_do_lock() we need to check return value of schedule_timeout_interruptible() and exit the loop when it returns nonzero, otherwise the loop is not really interruptible and after the signal, the loop is no longer throttled by P9_LOCK_TIMEOUT. Signed-off-by: Jim Garlick Signed-off-by: Eric Van Hensbergen --- diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c index 62857a810a7..a7ac45d5bd2 100644 --- a/fs/9p/vfs_file.c +++ b/fs/9p/vfs_file.c @@ -204,7 +204,8 @@ static int v9fs_file_do_lock(struct file *filp, int cmd, struct file_lock *fl) break; if (status == P9_LOCK_BLOCKED && !IS_SETLKW(cmd)) break; - schedule_timeout_interruptible(P9_LOCK_TIMEOUT); + if (schedule_timeout_interruptible(P9_LOCK_TIMEOUT) != 0) + break; } /* map 9p status to VFS status */