diff options
author | Benjamin Coddington <bcodding@redhat.com> | 2015-10-22 13:38:14 -0400 |
---|---|---|
committer | Jeff Layton <jeff.layton@primarydata.com> | 2015-10-22 14:57:36 -0400 |
commit | 4f6563677ae833baad8003e14353241bc25da4fc (patch) | |
tree | 6b54bdaa39f67c13cea45933dedc39f138051de9 /fs/nfs/file.c | |
parent | e55c34a66f87e78fb1fc6b623b78c5ad74b475af (diff) |
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 <bcodding@redhat.com>
Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
Diffstat (limited to 'fs/nfs/file.c')
-rw-r--r-- | fs/nfs/file.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c index c0f9b1ed12b9..37f639d50af5 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c | |||
@@ -738,18 +738,7 @@ out_noconflict: | |||
738 | 738 | ||
739 | static int do_vfs_lock(struct file *file, struct file_lock *fl) | 739 | static int do_vfs_lock(struct file *file, struct file_lock *fl) |
740 | { | 740 | { |
741 | int res = 0; | 741 | return locks_lock_file_wait(file, fl); |
742 | switch (fl->fl_flags & (FL_POSIX|FL_FLOCK)) { | ||
743 | case FL_POSIX: | ||
744 | res = posix_lock_file_wait(file, fl); | ||
745 | break; | ||
746 | case FL_FLOCK: | ||
747 | res = flock_lock_file_wait(file, fl); | ||
748 | break; | ||
749 | default: | ||
750 | BUG(); | ||
751 | } | ||
752 | return res; | ||
753 | } | 742 | } |
754 | 743 | ||
755 | static int | 744 | static int |