diff --git a/fs/locks.c b/fs/locks.c index 50857d2d3404a821268fb787f74ee1f7335ebd98..c795eaaf6c4ceb75e5b4a0e9775df8c37ffb9240 100644 --- a/fs/locks.c +++ b/fs/locks.c @@ -782,7 +782,7 @@ static int flock_lock_file(struct file *filp, struct file_lock *request) if (request->fl_flags & FL_ACCESS) goto out; locks_copy_lock(new_fl, request); - locks_insert_lock(&inode->i_flock, new_fl); + locks_insert_lock(before, new_fl); new_fl = NULL; error = 0;