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/nfsd | |
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/nfsd')
-rw-r--r-- | fs/nfsd/nfs4state.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 8ba1d888f1e6..326a545ea7b2 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -4932,20 +4932,22 @@ nfs4_transform_lock_offset(struct file_lock *lock) | |||
4932 | lock->fl_end = OFFSET_MAX; | 4932 | lock->fl_end = OFFSET_MAX; |
4933 | } | 4933 | } |
4934 | 4934 | ||
4935 | static void nfsd4_fl_get_owner(struct file_lock *dst, struct file_lock *src) | 4935 | static fl_owner_t |
4936 | nfsd4_fl_get_owner(fl_owner_t owner) | ||
4936 | { | 4937 | { |
4937 | struct nfs4_lockowner *lo = (struct nfs4_lockowner *)src->fl_owner; | 4938 | struct nfs4_lockowner *lo = (struct nfs4_lockowner *)owner; |
4938 | dst->fl_owner = (fl_owner_t)lockowner(nfs4_get_stateowner(&lo->lo_owner)); | 4939 | |
4940 | nfs4_get_stateowner(&lo->lo_owner); | ||
4941 | return owner; | ||
4939 | } | 4942 | } |
4940 | 4943 | ||
4941 | static void nfsd4_fl_put_owner(struct file_lock *fl) | 4944 | static void |
4945 | nfsd4_fl_put_owner(fl_owner_t owner) | ||
4942 | { | 4946 | { |
4943 | struct nfs4_lockowner *lo = (struct nfs4_lockowner *)fl->fl_owner; | 4947 | struct nfs4_lockowner *lo = (struct nfs4_lockowner *)owner; |
4944 | 4948 | ||
4945 | if (lo) { | 4949 | if (lo) |
4946 | nfs4_put_stateowner(&lo->lo_owner); | 4950 | nfs4_put_stateowner(&lo->lo_owner); |
4947 | fl->fl_owner = NULL; | ||
4948 | } | ||
4949 | } | 4951 | } |
4950 | 4952 | ||
4951 | static const struct lock_manager_operations nfsd_posix_mng_ops = { | 4953 | static const struct lock_manager_operations nfsd_posix_mng_ops = { |