diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-15 17:22:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-15 17:22:45 -0400 |
commit | 6d50ff91d9780263160262daeb6adfdda8ddbc6c (patch) | |
tree | e8e56a75dc03ac71bdfffcf1b97eebd6720e1580 /fs/nfsd/nfs4state.c | |
parent | eccd02f32a2c25139da2d5e72ebab1fee7b5baab (diff) | |
parent | 0429c2b5c1c4c8ba6cd563c1964baf3ed238df26 (diff) |
Merge tag 'locks-v4.1-1' of git://git.samba.org/jlayton/linux
Pull file locking related changes from Jeff Layton:
"This set is mostly minor cleanups to the overhaul that went in last
cycle. The other noticeable items are the changes to the lm_get_owner
and lm_put_owner prototypes, and the fact that we no longer need to
use the i_lock to protect the i_flctx pointer"
* tag 'locks-v4.1-1' of git://git.samba.org/jlayton/linux:
locks: use cmpxchg to assign i_flctx pointer
locks: get rid of WE_CAN_BREAK_LSLK_NOW dead code
locks: change lm_get_owner and lm_put_owner prototypes
locks: don't allocate a lock context for an F_UNLCK request
locks: Add lockdep assertion for blocked_lock_lock
locks: remove extraneous IS_POSIX and IS_FLOCK tests
locks: Remove unnecessary IS_POSIX test
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-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 = { |