diff options
author | Benjamin Coddington <bcodding@redhat.com> | 2015-10-22 20:38:14 +0300 |
---|---|---|
committer | Jeff Layton <jeff.layton@primarydata.com> | 2015-10-22 21:57:36 +0300 |
commit | 4f6563677ae833baad8003e14353241bc25da4fc (patch) | |
tree | 6b54bdaa39f67c13cea45933dedc39f138051de9 /fs/nfs/nfs4proc.c | |
parent | e55c34a66f87e78fb1fc6b623b78c5ad74b475af (diff) | |
download | linux-4f6563677ae833baad8003e14353241bc25da4fc.tar.xz |
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/nfs4proc.c')
-rw-r--r-- | fs/nfs/nfs4proc.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 693b903b48bd..ce64a45ab648 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -5472,18 +5472,7 @@ static int nfs4_proc_getlk(struct nfs4_state *state, int cmd, struct file_lock * static int do_vfs_lock(struct inode *inode, struct file_lock *fl) { - int res = 0; - switch (fl->fl_flags & (FL_POSIX|FL_FLOCK)) { - case FL_POSIX: - res = posix_lock_inode_wait(inode, fl); - break; - case FL_FLOCK: - res = flock_lock_inode_wait(inode, fl); - break; - default: - BUG(); - } - return res; + return locks_lock_inode_wait(inode, fl); } struct nfs4_unlockdata { |