diff options
author | Jeff Layton <jeff.layton@primarydata.com> | 2015-04-03 09:04:04 -0400 |
---|---|---|
committer | Jeff Layton <jeff.layton@primarydata.com> | 2015-04-03 09:04:04 -0400 |
commit | cae80b305e1c3944746dd93e33e9b2ccd5a490c1 (patch) | |
tree | 1ede43da59f29e2a9af7cfb13070310a4d073194 /fs/locks.c | |
parent | 5c1c669a1b2435e071d566b6db1a8e6b26542ba1 (diff) |
locks: change lm_get_owner and lm_put_owner prototypes
The current prototypes for these operations are somewhat awkward as they
deal with fl_owners but take struct file_lock arguments. In the future,
we'll want to be able to take references without necessarily dealing
with a struct file_lock.
Change them to take fl_owner_t arguments instead and have the callers
deal with assigning the values to the file_lock structs.
Signed-off-by: Jeff Layton <jlayton@primarydata.com>
Diffstat (limited to 'fs/locks.c')
-rw-r--r-- | fs/locks.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/locks.c b/fs/locks.c index 54a79883a7f9..3ebaafb4c587 100644 --- a/fs/locks.c +++ b/fs/locks.c | |||
@@ -276,8 +276,10 @@ void locks_release_private(struct file_lock *fl) | |||
276 | } | 276 | } |
277 | 277 | ||
278 | if (fl->fl_lmops) { | 278 | if (fl->fl_lmops) { |
279 | if (fl->fl_lmops->lm_put_owner) | 279 | if (fl->fl_lmops->lm_put_owner) { |
280 | fl->fl_lmops->lm_put_owner(fl); | 280 | fl->fl_lmops->lm_put_owner(fl->fl_owner); |
281 | fl->fl_owner = NULL; | ||
282 | } | ||
281 | fl->fl_lmops = NULL; | 283 | fl->fl_lmops = NULL; |
282 | } | 284 | } |
283 | } | 285 | } |
@@ -333,7 +335,7 @@ void locks_copy_conflock(struct file_lock *new, struct file_lock *fl) | |||
333 | 335 | ||
334 | if (fl->fl_lmops) { | 336 | if (fl->fl_lmops) { |
335 | if (fl->fl_lmops->lm_get_owner) | 337 | if (fl->fl_lmops->lm_get_owner) |
336 | fl->fl_lmops->lm_get_owner(new, fl); | 338 | fl->fl_lmops->lm_get_owner(fl->fl_owner); |
337 | } | 339 | } |
338 | } | 340 | } |
339 | EXPORT_SYMBOL(locks_copy_conflock); | 341 | EXPORT_SYMBOL(locks_copy_conflock); |