locks: don't reuse file_lock in __posix_lock_file
locks: don't reuse file_lock in __posix_lock_file

Currently in the case where a new file lock completely replaces the old
one, we end up overwriting the existing lock with the new info. This
means that we have to call fl_release_private inside i_lock. Change the
code to instead copy the info to new_fl, insert that lock into the
correct spot and then delete the old lock. In a later patch, we'll defer
the freeing of the old lock until after the i_lock has been dropped.

Acked-by: J. Bruce Fields <51738506c1b2ccb0761f23bdc612c93babf738ea@fieldses.org>
Signed-off-by: Jeff Layton <4376fbf8623cd7b7c0232225289bb91cedc0a27f@primarydata.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs