From: Jeff Layton Date: Mon, 10 Mar 2014 13:54:19 +0000 (-0400) Subject: locks: make locks_mandatory_area check for file-private locks X-Git-Tag: v3.15-rc1~98^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29723adee11804b548903ddb1db666cf4a60f60e;p=pandora-kernel.git locks: make locks_mandatory_area check for file-private locks Allow locks_mandatory_area() to handle file-private locks correctly. If there is a file-private lock set on an open file and we're doing I/O via the same, then that should not cause anything to block. Handle this by first doing a non-blocking FL_ACCESS check for a file-private lock, and then fall back to checking for a classic POSIX lock (and possibly blocking). Note that this approach is subject to the same races that have always plagued mandatory locking on Linux. Reported-by: Trond Myklebust Signed-off-by: Jeff Layton --- Reading git-diff-tree failed