diff options
Diffstat (limited to 'fs/lockd/svcsubs.c')
-rw-r--r-- | fs/lockd/svcsubs.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/fs/lockd/svcsubs.c b/fs/lockd/svcsubs.c index 514f5f20701e..e83024e16042 100644 --- a/fs/lockd/svcsubs.c +++ b/fs/lockd/svcsubs.c | |||
@@ -78,14 +78,14 @@ static inline unsigned int file_hash(struct nfs_fh *f) | |||
78 | * This is not quite right, but for now, we assume the client performs | 78 | * This is not quite right, but for now, we assume the client performs |
79 | * the proper R/W checking. | 79 | * the proper R/W checking. |
80 | */ | 80 | */ |
81 | u32 | 81 | __be32 |
82 | nlm_lookup_file(struct svc_rqst *rqstp, struct nlm_file **result, | 82 | nlm_lookup_file(struct svc_rqst *rqstp, struct nlm_file **result, |
83 | struct nfs_fh *f) | 83 | struct nfs_fh *f) |
84 | { | 84 | { |
85 | struct hlist_node *pos; | 85 | struct hlist_node *pos; |
86 | struct nlm_file *file; | 86 | struct nlm_file *file; |
87 | unsigned int hash; | 87 | unsigned int hash; |
88 | u32 nfserr; | 88 | __be32 nfserr; |
89 | 89 | ||
90 | nlm_debug_print_fh("nlm_file_lookup", f); | 90 | nlm_debug_print_fh("nlm_file_lookup", f); |
91 | 91 | ||
@@ -135,12 +135,6 @@ out_unlock: | |||
135 | 135 | ||
136 | out_free: | 136 | out_free: |
137 | kfree(file); | 137 | kfree(file); |
138 | #ifdef CONFIG_LOCKD_V4 | ||
139 | if (nfserr == 1) | ||
140 | nfserr = nlm4_stale_fh; | ||
141 | else | ||
142 | #endif | ||
143 | nfserr = nlm_lck_denied; | ||
144 | goto out_unlock; | 138 | goto out_unlock; |
145 | } | 139 | } |
146 | 140 | ||
@@ -324,7 +318,16 @@ nlmsvc_same_host(struct nlm_host *host, struct nlm_host *other) | |||
324 | static int | 318 | static int |
325 | nlmsvc_is_client(struct nlm_host *host, struct nlm_host *dummy) | 319 | nlmsvc_is_client(struct nlm_host *host, struct nlm_host *dummy) |
326 | { | 320 | { |
327 | return host->h_server; | 321 | if (host->h_server) { |
322 | /* we are destroying locks even though the client | ||
323 | * hasn't asked us too, so don't unmonitor the | ||
324 | * client | ||
325 | */ | ||
326 | if (host->h_nsmhandle) | ||
327 | host->h_nsmhandle->sm_sticky = 1; | ||
328 | return 1; | ||
329 | } else | ||
330 | return 0; | ||
328 | } | 331 | } |
329 | 332 | ||
330 | /* | 333 | /* |