NFS has recently been moving things around to cope with the situation where
a struct file may not be available during an unlock. That work has
presented an opportunity to do a minor cleanup on the locks API.
Users of posix_lock_file_wait() (for FL_POSIX style locks) and
flock_lock_file_wait()
Instead of having users check for FL_POSIX or FL_FLOCK to call the correct
locks API function, use the check within locks_lock_inode_wait(). This
allows for some later cleanup.
Signed-off-by: Benjamin Coddington
---
drivers/staging/lustre/lustre/llite/file.c |8
Users of the locks API commonly call either posix_lock_file_wait() or
flock_lock_file_wait() depending upon the lock type. Add a new function
locks_lock_inode_wait() which will check and call the correct function for
the type of lock passed in.
Signed-off-by: Benjamin Coddington
All callers use locks_lock_inode_wait() instead.
Signed-off-by: Benjamin Coddington
---
fs/locks.c |5 +
include/linux/fs.h | 24
2 files changed, 1 insertions(+), 28 deletions(-)
diff --git a/fs/locks.c b/fs/locks.c
index
Hi Benjamin,
[auto build test WARNING on jlayton/linux-next -- if it's inappropriate base,
please suggest rules for selecting the more suitable base]
url:
https://github.com/0day-ci/linux/commits/Benjamin-Coddington/locks-introduce-locks_lock_inode_wait/20151022-233848
reproduce
Signed-off-by: Fengguang Wu
---
locks.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/locks.c b/fs/locks.c
index daf4664..0d2b326 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -1173,7 +1173,7 @@ EXPORT_SYMBOL(posix_lock_file);
*
* Apply
On Thu, 22 Oct 2015, Benjamin Coddington wrote:
> Users of the locks API commonly call either posix_lock_file_wait() or
> flock_lock_file_wait() depending upon the lock type. Add a new function
> locks_lock_inode_wait() which will check and call the correct function for
> the type of lock passed
Hi Benjamin,
[auto build test ERROR on jlayton/linux-next -- if it's inappropriate base,
please suggest rules for selecting the more suitable base]
url:
https://github.com/0day-ci/linux/commits/Benjamin-Coddington/locks-introduce-locks_lock_inode_wait/20151022-233848
config: x86_64