]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/locks.c
Merge tag 'v4.1-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux...
[karo-tx-linux.git] / fs / locks.c
index fe8f9f46445bca27a11ba0ee946806abb297e405..365c82e1b3a9a602057e65edc9b857c6adce6b76 100644 (file)
@@ -901,16 +901,6 @@ static int flock_lock_file(struct file *filp, struct file_lock *request)
                goto out;
        }
 
-       /*
-        * If a higher-priority process was blocked on the old file lock,
-        * give it the opportunity to lock the file.
-        */
-       if (found) {
-               spin_unlock(&ctx->flc_lock);
-               cond_resched();
-               spin_lock(&ctx->flc_lock);
-       }
-
 find_conflict:
        list_for_each_entry(fl, &ctx->flc_flock, fl_list) {
                if (!flock_locks_conflict(request, fl))
@@ -1117,6 +1107,7 @@ static int __posix_lock_file(struct inode *inode, struct file_lock *request, str
                }
                locks_copy_lock(new_fl, request);
                locks_insert_lock_ctx(new_fl, &fl->fl_list);
+               fl = new_fl;
                new_fl = NULL;
        }
        if (right) {