X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=fs%2Flocks.c;h=a8794f233bc9c38d45c47f69d03652f7f6f8d533;hb=b46d37e61f886e901ba0b504125b135f450a19b5;hp=b6440f52178fad125f3d0101d7a97f82ad2cf3ee;hpb=4c0bccbe66ffe34f7bc88d29c345f9a7888656eb;p=mirror_ubuntu-artful-kernel.git diff --git a/fs/locks.c b/fs/locks.c index b6440f52178f..a8794f233bc9 100644 --- a/fs/locks.c +++ b/fs/locks.c @@ -434,7 +434,7 @@ static int lease_mylease_callback(struct file_lock *fl, struct file_lock *try) return fl->fl_file == try->fl_file; } -static struct lock_manager_operations lease_manager_ops = { +static const struct lock_manager_operations lease_manager_ops = { .fl_break = lease_break_callback, .fl_release_private = lease_release_private_callback, .fl_mylease = lease_mylease_callback, @@ -768,7 +768,7 @@ static int flock_lock_file(struct file *filp, struct file_lock *request) * give it the opportunity to lock the file. */ if (found) - cond_resched_bkl(); + cond_resched(); find_conflict: for_each_lock(inode, before) { @@ -1591,7 +1591,7 @@ SYSCALL_DEFINE2(flock, unsigned int, fd, unsigned int, cmd) if (can_sleep) lock->fl_flags |= FL_SLEEP; - error = security_file_lock(filp, cmd); + error = security_file_lock(filp, lock->fl_type); if (error) goto out_free;