Skip to content

Commit

Permalink
fs/9p: check schedule_timeout_interruptible return value
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Eric Van Hensbergen <[email protected]>
  • Loading branch information
garlick authored and ericvh committed Jan 5, 2012
1 parent 805a6af commit a0ea787
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/9p/vfs_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit a0ea787

Please sign in to comment.