mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
locks: don't call ->copy_lock methods on return of conflicting locks
The file_lock structure is used both as a heavy-weight representation of an active lock, with pointers to reference-counted structures, etc., and as a simple container for parameters that describe a file lock. The conflicting lock returned from __posix_lock_file is an example of the latter; so don't call the filesystem or lock manager callbacks when copying to it. This also saves the need for an unnecessary locks_init_lock in the nfsv4 server. Thanks to Trond for pointing out the error. Signed-off-by: J. Bruce Fields <[email protected]> Cc: Trond Myklebust <[email protected]>
This commit is contained in:
parent
17efa372cf
commit
1a747ee0cc
4 changed files with 4 additions and 6 deletions
|
|
@ -632,7 +632,7 @@ nlmsvc_update_deferred_block(struct nlm_block *block, struct file_lock *conf,
|
|||
block->b_flags |= B_TIMED_OUT;
|
||||
if (conf) {
|
||||
if (block->b_fl)
|
||||
locks_copy_lock(block->b_fl, conf);
|
||||
__locks_copy_lock(block->b_fl, conf);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue