]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nfs: don't sleep with inode lock in lock_and_join_requests
authorWeston Andros Adamson <dros@primarydata.com>
Mon, 15 Sep 2014 18:14:43 +0000 (14:14 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 5 Oct 2014 20:41:01 +0000 (13:41 -0700)
commit274a1dc919c8dc46e4517cee0e7e92e746bf16e7
treee0339d16f724912f2393b5312526394efa38734c
parentae3f3485448578097a115f341733d938c357c46b
nfs: don't sleep with inode lock in lock_and_join_requests

commit 7c3af975257383ece54b83c0505d3e0656cb7daf upstream.

This handles the 'nonblock=false' case in nfs_lock_and_join_requests.
If the group is already locked and blocking is allowed, drop the inode lock
and wait for the group lock to be cleared before trying it all again.
This should fix warnings found in peterz's tree (sched/wait branch), where
might_sleep() checks are added to wait.[ch].

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Weston Andros Adamson <dros@primarydata.com>
Reviewed-by: Peng Tao <tao.peng@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/pagelist.c
fs/nfs/write.c
include/linux/nfs_page.h