Merge branch 'for-4.4/io-poll' of git://git.kernel.dk/linux-block
[cascardo/linux.git] / fs / 9p / vfs_file.c
index 3abc447..7bf835f 100644 (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,8 @@ 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);
+               /* Even if this fails we want to return the remote error */
+               locks_lock_file_wait(filp, fl);
                fl->fl_type = fl_type;
        }
 out: