aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/nfs4namespace.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/nfs/nfs4namespace.c b/fs/nfs/nfs4namespace.c
index 2636c26d56fa..fa3408f20112 100644
--- a/fs/nfs/nfs4namespace.c
+++ b/fs/nfs/nfs4namespace.c
@@ -121,7 +121,7 @@ static struct vfsmount *try_location(struct nfs_clone_mount *mountdata,
121 121
122 mnt_path = nfs4_pathname_string(&location->rootpath, page2, PAGE_SIZE); 122 mnt_path = nfs4_pathname_string(&location->rootpath, page2, PAGE_SIZE);
123 if (IS_ERR(mnt_path)) 123 if (IS_ERR(mnt_path))
124 return mnt; 124 return ERR_CAST(mnt_path);
125 mountdata->mnt_path = mnt_path; 125 mountdata->mnt_path = mnt_path;
126 maxbuflen = mnt_path - 1 - page2; 126 maxbuflen = mnt_path - 1 - page2;
127 127
@@ -132,15 +132,15 @@ static struct vfsmount *try_location(struct nfs_clone_mount *mountdata,
132 if (buf->len <= 0 || buf->len >= maxbuflen) 132 if (buf->len <= 0 || buf->len >= maxbuflen)
133 continue; 133 continue;
134 134
135 mountdata->addr = (struct sockaddr *)&addr;
136
137 if (memchr(buf->data, IPV6_SCOPE_DELIMITER, buf->len)) 135 if (memchr(buf->data, IPV6_SCOPE_DELIMITER, buf->len))
138 continue; 136 continue;
139 mountdata->addrlen = nfs_parse_server_name(buf->data, 137
140 buf->len, 138 mountdata->addrlen = nfs_parse_server_name(buf->data, buf->len,
141 mountdata->addr, mountdata->addrlen); 139 (struct sockaddr *)&addr, sizeof(addr));
142 if (mountdata->addrlen == 0) 140 if (mountdata->addrlen == 0)
143 continue; 141 continue;
142
143 mountdata->addr = (struct sockaddr *)&addr;
144 rpc_set_port(mountdata->addr, NFS_PORT); 144 rpc_set_port(mountdata->addr, NFS_PORT);
145 145
146 memcpy(page2, buf->data, buf->len); 146 memcpy(page2, buf->data, buf->len);