Merge tag 'locks-v4.4-1' of git://git.samba.org/jlayton/linux
[firefly-linux-kernel-4.4.55.git] / fs / nfs / nfs4proc.c
index 5133bb18830e8c8b97e68e8f2c55d617ff92a321..0e5ff69455c7beba96df05104594bcb3dee336a7 100644 (file)
@@ -5513,18 +5513,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 {