diff options
author | J. Bruce Fields <bfields@citi.umich.edu> | 2008-04-24 14:08:22 (GMT) |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2008-04-25 17:00:11 (GMT) |
commit | 1a747ee0cc11a198f9e2435add821bd0dfedb7c1 (patch) | |
tree | 10b5a55bde30bef3f466e5126bd44fc0e111fc5a /include | |
parent | 17efa372cfe4d189705edf6cd4fbe283827a5dc7 (diff) | |
download | linux-1a747ee0cc11a198f9e2435add821bd0dfedb7c1.tar.xz |
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 <bfields@citi.umich.edu>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/fs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index cc2be2c..6556f2f 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -973,6 +973,7 @@ extern int do_sync_mapping_range(struct address_space *mapping, loff_t offset, /* fs/locks.c */ extern void locks_init_lock(struct file_lock *); extern void locks_copy_lock(struct file_lock *, struct file_lock *); +extern void __locks_copy_lock(struct file_lock *, const struct file_lock *); extern void locks_remove_posix(struct file *, fl_owner_t); extern void locks_remove_flock(struct file *); extern void posix_test_lock(struct file *, struct file_lock *); |