diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-25 13:03:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-25 13:03:28 -0400 |
commit | 40471856f2e38e9bfa8d605295e8234421110dd6 (patch) | |
tree | 9757e42e40bdbfcff7c52ab133e32b5c2203153b /net | |
parent | ae005cbed12d0b340b04b59d6f5c56e710b3895d (diff) | |
parent | 0acd2201920d0968919f4f5797d63f7b6f2b19d4 (diff) |
Merge branch 'nfs-for-2.6.39' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
* 'nfs-for-2.6.39' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6: (28 commits)
Cleanup XDR parsing for LAYOUTGET, GETDEVICEINFO
NFSv4.1 convert layoutcommit sync to boolean
NFSv4.1 pnfs_layoutcommit_inode fixes
NFS: Determine initial mount security
NFS: use secinfo when crossing mountpoints
NFS: Add secinfo procedure
NFS: lookup supports alternate client
NFS: convert call_sync() to a function
NFSv4.1 remove temp code that prevented ds commits
NFSv4.1: layoutcommit
NFSv4.1: filelayout driver specific code for COMMIT
NFSv4.1: remove GETATTR from ds commits
NFSv4.1: add generic layer hooks for pnfs COMMIT
NFSv4.1: alloc and free commit_buckets
NFSv4.1: shift filelayout_free_lseg
NFSv4.1: pull out code from nfs_commit_release
NFSv4.1: pull error handling out of nfs_commit_list
NFSv4.1: add callback to nfs4_commit_done
NFSv4.1: rearrange nfs_commit_rpcsetup
NFSv4.1: don't send COMMIT to ds for data sync writes
...
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/auth_gss/gss_mech_switch.c | 38 | ||||
-rw-r--r-- | net/sunrpc/xprtsock.c | 2 |
2 files changed, 40 insertions, 0 deletions
diff --git a/net/sunrpc/auth_gss/gss_mech_switch.c b/net/sunrpc/auth_gss/gss_mech_switch.c index 8b4061049d76..e3c36a274412 100644 --- a/net/sunrpc/auth_gss/gss_mech_switch.c +++ b/net/sunrpc/auth_gss/gss_mech_switch.c | |||
@@ -160,6 +160,28 @@ gss_mech_get_by_name(const char *name) | |||
160 | 160 | ||
161 | EXPORT_SYMBOL_GPL(gss_mech_get_by_name); | 161 | EXPORT_SYMBOL_GPL(gss_mech_get_by_name); |
162 | 162 | ||
163 | struct gss_api_mech * | ||
164 | gss_mech_get_by_OID(struct xdr_netobj *obj) | ||
165 | { | ||
166 | struct gss_api_mech *pos, *gm = NULL; | ||
167 | |||
168 | spin_lock(®istered_mechs_lock); | ||
169 | list_for_each_entry(pos, ®istered_mechs, gm_list) { | ||
170 | if (obj->len == pos->gm_oid.len) { | ||
171 | if (0 == memcmp(obj->data, pos->gm_oid.data, obj->len)) { | ||
172 | if (try_module_get(pos->gm_owner)) | ||
173 | gm = pos; | ||
174 | break; | ||
175 | } | ||
176 | } | ||
177 | } | ||
178 | spin_unlock(®istered_mechs_lock); | ||
179 | return gm; | ||
180 | |||
181 | } | ||
182 | |||
183 | EXPORT_SYMBOL_GPL(gss_mech_get_by_OID); | ||
184 | |||
163 | static inline int | 185 | static inline int |
164 | mech_supports_pseudoflavor(struct gss_api_mech *gm, u32 pseudoflavor) | 186 | mech_supports_pseudoflavor(struct gss_api_mech *gm, u32 pseudoflavor) |
165 | { | 187 | { |
@@ -193,6 +215,22 @@ gss_mech_get_by_pseudoflavor(u32 pseudoflavor) | |||
193 | 215 | ||
194 | EXPORT_SYMBOL_GPL(gss_mech_get_by_pseudoflavor); | 216 | EXPORT_SYMBOL_GPL(gss_mech_get_by_pseudoflavor); |
195 | 217 | ||
218 | int gss_mech_list_pseudoflavors(rpc_authflavor_t *array_ptr) | ||
219 | { | ||
220 | struct gss_api_mech *pos = NULL; | ||
221 | int i = 0; | ||
222 | |||
223 | spin_lock(®istered_mechs_lock); | ||
224 | list_for_each_entry(pos, ®istered_mechs, gm_list) { | ||
225 | array_ptr[i] = pos->gm_pfs->pseudoflavor; | ||
226 | i++; | ||
227 | } | ||
228 | spin_unlock(®istered_mechs_lock); | ||
229 | return i; | ||
230 | } | ||
231 | |||
232 | EXPORT_SYMBOL_GPL(gss_mech_list_pseudoflavors); | ||
233 | |||
196 | u32 | 234 | u32 |
197 | gss_svc_to_pseudoflavor(struct gss_api_mech *gm, u32 service) | 235 | gss_svc_to_pseudoflavor(struct gss_api_mech *gm, u32 service) |
198 | { | 236 | { |
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index be96d429b475..1e336a06d3e6 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c | |||
@@ -710,6 +710,8 @@ static void xs_reset_transport(struct sock_xprt *transport) | |||
710 | if (sk == NULL) | 710 | if (sk == NULL) |
711 | return; | 711 | return; |
712 | 712 | ||
713 | transport->srcport = 0; | ||
714 | |||
713 | write_lock_bh(&sk->sk_callback_lock); | 715 | write_lock_bh(&sk->sk_callback_lock); |
714 | transport->inet = NULL; | 716 | transport->inet = NULL; |
715 | transport->sock = NULL; | 717 | transport->sock = NULL; |