Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <garlick.jim@gmail.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>

authored by

Jim Garlick and committed by
Eric Van Hensbergen
a0ea787b 805a6af8

+2 -1
+2 -1
fs/9p/vfs_file.c
··· 204 204 break; 205 205 if (status == P9_LOCK_BLOCKED && !IS_SETLKW(cmd)) 206 206 break; 207 - schedule_timeout_interruptible(P9_LOCK_TIMEOUT); 207 + if (schedule_timeout_interruptible(P9_LOCK_TIMEOUT) != 0) 208 + break; 208 209 } 209 210 210 211 /* map 9p status to VFS status */