diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-10-20 17:22:47 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-10-20 17:22:47 -0400 |
commit | ec073428281b401f1142cb84b277a5b00c7994c9 (patch) | |
tree | c96e6d10af61dc3fd678c46dda505791812ca985 /fs/nfs/nfs4proc.c | |
parent | 4e51336a00bdcb42960acca52c23e90e9f4e6959 (diff) |
NFSv4: Fix up locking for nfs4_state_owner
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r-- | fs/nfs/nfs4proc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 2d9357cf3fc5..9c1da34036aa 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -212,6 +212,7 @@ static void update_open_stateid(struct nfs4_state *state, nfs4_stateid *stateid, | |||
212 | 212 | ||
213 | open_flags &= (FMODE_READ|FMODE_WRITE); | 213 | open_flags &= (FMODE_READ|FMODE_WRITE); |
214 | /* Protect against nfs4_find_state() */ | 214 | /* Protect against nfs4_find_state() */ |
215 | spin_lock(&state->owner->so_lock); | ||
215 | spin_lock(&inode->i_lock); | 216 | spin_lock(&inode->i_lock); |
216 | state->state |= open_flags; | 217 | state->state |= open_flags; |
217 | /* NB! List reordering - see the reclaim code for why. */ | 218 | /* NB! List reordering - see the reclaim code for why. */ |
@@ -221,6 +222,7 @@ static void update_open_stateid(struct nfs4_state *state, nfs4_stateid *stateid, | |||
221 | state->nreaders++; | 222 | state->nreaders++; |
222 | memcpy(&state->stateid, stateid, sizeof(state->stateid)); | 223 | memcpy(&state->stateid, stateid, sizeof(state->stateid)); |
223 | spin_unlock(&inode->i_lock); | 224 | spin_unlock(&inode->i_lock); |
225 | spin_unlock(&state->owner->so_lock); | ||
224 | } | 226 | } |
225 | 227 | ||
226 | /* | 228 | /* |