mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
Move locks API users to locks_lock_inode_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 <[email protected]> Signed-off-by: Jeff Layton <[email protected]>
This commit is contained in:
parent
e55c34a66f
commit
4f6563677a
12 changed files with 22 additions and 59 deletions
|
|
@ -172,7 +172,7 @@ int dlm_posix_lock(dlm_lockspace_t *lockspace, u64 number, struct file *file,
|
|||
rv = op->info.rv;
|
||||
|
||||
if (!rv) {
|
||||
if (posix_lock_file_wait(file, fl) < 0)
|
||||
if (locks_lock_file_wait(file, fl) < 0)
|
||||
log_error(ls, "dlm_posix_lock: vfs lock error %llx",
|
||||
(unsigned long long)number);
|
||||
}
|
||||
|
|
@ -262,7 +262,7 @@ int dlm_posix_unlock(dlm_lockspace_t *lockspace, u64 number, struct file *file,
|
|||
/* cause the vfs unlock to return ENOENT if lock is not found */
|
||||
fl->fl_flags |= FL_EXISTS;
|
||||
|
||||
rv = posix_lock_file_wait(file, fl);
|
||||
rv = locks_lock_file_wait(file, fl);
|
||||
if (rv == -ENOENT) {
|
||||
rv = 0;
|
||||
goto out_free;
|
||||
|
|
|
|||
Loading…
Reference in a new issue