Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79641
b: refs/heads/master
c: 6677d09
h: refs/heads/master
i:
  79639: 9f0ae8d
v: v3
  • Loading branch information
Chuck Lever authored and Trond Myklebust committed Jan 30, 2008
1 parent 8df689b commit 3125e3a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dcecae0ff44dceea7adb6bef5c8eb660fe87a93c
refs/heads/master: 6677d09513e35ac2f38d3a8c8a26fbd7bbcef192
4 changes: 2 additions & 2 deletions trunk/fs/nfs/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -1094,8 +1094,8 @@ struct nfs_server *nfs4_create_referral_server(struct nfs_clone_mount *data,
/* Get a client representation.
* Note: NFSv4 always uses TCP, */
error = nfs4_set_client(server, data->hostname,
(struct sockaddr *)data->addr,
sizeof(*data->addr),
data->addr,
data->addrlen,
parent_client->cl_ipaddr,
data->authflavor,
parent_server->client->cl_xprt->prot,
Expand Down
3 changes: 2 additions & 1 deletion trunk/fs/nfs/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ struct nfs_clone_mount {
struct nfs_fattr *fattr;
char *hostname;
char *mnt_path;
struct sockaddr_in *addr;
struct sockaddr *addr;
size_t addrlen;
rpc_authflavor_t authflavor;
};

Expand Down
12 changes: 7 additions & 5 deletions trunk/fs/nfs/nfs4namespace.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,10 @@ static struct vfsmount *nfs_follow_referral(const struct vfsmount *mnt_parent,

s = 0;
while (s < location->nservers) {
struct sockaddr_in addr = {};
struct sockaddr_in addr = {
.sin_family = AF_INET,
.sin_port = htons(NFS_PORT),
};

if (location->servers[s].len <= 0 ||
valid_ipaddr4(location->servers[s].data) < 0) {
Expand All @@ -181,10 +184,9 @@ static struct vfsmount *nfs_follow_referral(const struct vfsmount *mnt_parent,
}

mountdata.hostname = location->servers[s].data;
addr.sin_addr.s_addr = in_aton(mountdata.hostname);
addr.sin_family = AF_INET;
addr.sin_port = htons(NFS_PORT);
mountdata.addr = &addr;
addr.sin_addr.s_addr = in_aton(mountdata.hostname),
mountdata.addr = (struct sockaddr *)&addr;
mountdata.addrlen = sizeof(addr);

snprintf(page, PAGE_SIZE, "%s:%s",
mountdata.hostname,
Expand Down

0 comments on commit 3125e3a

Please sign in to comment.