diff options
author | J. Bruce Fields <bfields@redhat.com> | 2014-05-22 15:48:11 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2014-05-22 15:48:15 -0400 |
commit | f35ea0d4b66b789e0edcea634238e9aa31924516 (patch) | |
tree | 2de32d027b8dab67153d7133f42c732c5d9e0ffe /fs | |
parent | cbf7a75bc58a2458bd6e47476e47819ba3f40b00 (diff) | |
parent | 27b11428b7de097c42f205beabb1764f4365443b (diff) |
Merge 3.15 bugfixes for 3.16
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfsd/nfs4acl.c | 2 | ||||
-rw-r--r-- | fs/nfsd/nfs4state.c | 15 |
2 files changed, 14 insertions, 3 deletions
diff --git a/fs/nfsd/nfs4acl.c b/fs/nfsd/nfs4acl.c index 05c9b2f9427b..7c7c02554a81 100644 --- a/fs/nfsd/nfs4acl.c +++ b/fs/nfsd/nfs4acl.c | |||
@@ -589,7 +589,7 @@ posix_state_to_acl(struct posix_acl_state *state, unsigned int flags) | |||
589 | add_to_mask(state, &state->groups->aces[i].perms); | 589 | add_to_mask(state, &state->groups->aces[i].perms); |
590 | } | 590 | } |
591 | 591 | ||
592 | if (!state->users->n && !state->groups->n) { | 592 | if (state->users->n || state->groups->n) { |
593 | pace++; | 593 | pace++; |
594 | pace->e_tag = ACL_MASK; | 594 | pace->e_tag = ACL_MASK; |
595 | low_mode_from_nfs4(state->mask.allow, &pace->e_perm, flags); | 595 | low_mode_from_nfs4(state->mask.allow, &pace->e_perm, flags); |
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index c6ded9feaef9..a037627ce5c7 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -3716,9 +3716,16 @@ out: | |||
3716 | static __be32 | 3716 | static __be32 |
3717 | nfsd4_free_lock_stateid(struct nfs4_ol_stateid *stp) | 3717 | nfsd4_free_lock_stateid(struct nfs4_ol_stateid *stp) |
3718 | { | 3718 | { |
3719 | if (check_for_locks(stp->st_file, lockowner(stp->st_stateowner))) | 3719 | struct nfs4_lockowner *lo = lockowner(stp->st_stateowner); |
3720 | |||
3721 | if (check_for_locks(stp->st_file, lo)) | ||
3720 | return nfserr_locks_held; | 3722 | return nfserr_locks_held; |
3721 | release_lock_stateid(stp); | 3723 | /* |
3724 | * Currently there's a 1-1 lock stateid<->lockowner | ||
3725 | * correspondance, and we have to delete the lockowner when we | ||
3726 | * delete the lock stateid: | ||
3727 | */ | ||
3728 | unhash_lockowner(lo); | ||
3722 | return nfs_ok; | 3729 | return nfs_ok; |
3723 | } | 3730 | } |
3724 | 3731 | ||
@@ -4158,6 +4165,10 @@ static bool same_lockowner_ino(struct nfs4_lockowner *lo, struct inode *inode, c | |||
4158 | 4165 | ||
4159 | if (!same_owner_str(&lo->lo_owner, owner, clid)) | 4166 | if (!same_owner_str(&lo->lo_owner, owner, clid)) |
4160 | return false; | 4167 | return false; |
4168 | if (list_empty(&lo->lo_owner.so_stateids)) { | ||
4169 | WARN_ON_ONCE(1); | ||
4170 | return false; | ||
4171 | } | ||
4161 | lst = list_first_entry(&lo->lo_owner.so_stateids, | 4172 | lst = list_first_entry(&lo->lo_owner.so_stateids, |
4162 | struct nfs4_ol_stateid, st_perstateowner); | 4173 | struct nfs4_ol_stateid, st_perstateowner); |
4163 | return lst->st_file->fi_inode == inode; | 4174 | return lst->st_file->fi_inode == inode; |