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:
Benjamin Coddington 2015-10-22 13:38:14 -04:00 • committed by Jeff Layton
commit 4f6563677a
12 changed files with 22 additions and 59 deletions

View file

@ -161,7 +161,7 @@ static int v9fs_file_do_lock(struct file *filp, int cmd, struct file_lock *fl)
if ((fl->fl_flags & FL_POSIX) != FL_POSIX)
BUG();
res = posix_lock_file_wait(filp, fl);
res = locks_lock_file_wait(filp, fl);
if (res < 0)
goto out;
@ -231,7 +231,7 @@ out_unlock:
if (res < 0 && fl->fl_type != F_UNLCK) {
fl_type = fl->fl_type;
fl->fl_type = F_UNLCK;
res = posix_lock_file_wait(filp, fl);
res = locks_lock_file_wait(filp, fl);
fl->fl_type = fl_type;
}
out: