summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorWeston Andros Adamson <dros@primarydata.com>2014-09-15 14:14:43 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-10-05 13:41:01 -0700
commit274a1dc919c8dc46e4517cee0e7e92e746bf16e7 (patch)
treee0339d16f724912f2393b5312526394efa38734c /include
parentae3f3485448578097a115f341733d938c357c46b (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/nfs_page.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h
index c18c315db126..55a486421fdd 100644
--- a/include/linux/nfs_page.h
+++ b/include/linux/nfs_page.h
@@ -121,6 +121,7 @@ extern int nfs_wait_on_request(struct nfs_page *);
extern void nfs_unlock_request(struct nfs_page *req);
extern void nfs_unlock_and_release_request(struct nfs_page *);
extern int nfs_page_group_lock(struct nfs_page *, bool);
+extern void nfs_page_group_lock_wait(struct nfs_page *);
extern void nfs_page_group_unlock(struct nfs_page *);
extern bool nfs_page_group_sync_on_bit(struct nfs_page *, unsigned int);