diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2011-02-04 13:46:43 -0500 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2011-02-04 13:46:43 -0500 |
commit | c64eae9a73a847c1698f913c893aa4012d2a30b0 (patch) | |
tree | 732684b9ffe9dfd6e9a11b1f006eaaefeb0e945b /fs/nfs/nfs4filelayoutdev.c | |
parent | c9e358dfc4a8cb2227172ef77908c2e0ee17bcb9 (diff) | |
parent | ebf53826e105f488f4f628703a108e98940d1dc5 (diff) |
Merge commit 'v2.6.38-rc3' into devicetree/next
Diffstat (limited to 'fs/nfs/nfs4filelayoutdev.c')
-rw-r--r-- | fs/nfs/nfs4filelayoutdev.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/nfs/nfs4filelayoutdev.c b/fs/nfs/nfs4filelayoutdev.c index 51fe64ace55..f5c9b125e8c 100644 --- a/fs/nfs/nfs4filelayoutdev.c +++ b/fs/nfs/nfs4filelayoutdev.c | |||
@@ -214,7 +214,7 @@ decode_and_add_ds(__be32 **pp, struct inode *inode) | |||
214 | 214 | ||
215 | /* ipv6 length plus port is legal */ | 215 | /* ipv6 length plus port is legal */ |
216 | if (rlen > INET6_ADDRSTRLEN + 8) { | 216 | if (rlen > INET6_ADDRSTRLEN + 8) { |
217 | dprintk("%s Invalid address, length %d\n", __func__, | 217 | dprintk("%s: Invalid address, length %d\n", __func__, |
218 | rlen); | 218 | rlen); |
219 | goto out_err; | 219 | goto out_err; |
220 | } | 220 | } |
@@ -225,6 +225,11 @@ decode_and_add_ds(__be32 **pp, struct inode *inode) | |||
225 | /* replace the port dots with dashes for the in4_pton() delimiter*/ | 225 | /* replace the port dots with dashes for the in4_pton() delimiter*/ |
226 | for (i = 0; i < 2; i++) { | 226 | for (i = 0; i < 2; i++) { |
227 | char *res = strrchr(buf, '.'); | 227 | char *res = strrchr(buf, '.'); |
228 | if (!res) { | ||
229 | dprintk("%s: Failed finding expected dots in port\n", | ||
230 | __func__); | ||
231 | goto out_free; | ||
232 | } | ||
228 | *res = '-'; | 233 | *res = '-'; |
229 | } | 234 | } |
230 | 235 | ||
@@ -240,7 +245,7 @@ decode_and_add_ds(__be32 **pp, struct inode *inode) | |||
240 | port = htons((tmp[0] << 8) | (tmp[1])); | 245 | port = htons((tmp[0] << 8) | (tmp[1])); |
241 | 246 | ||
242 | ds = nfs4_pnfs_ds_add(inode, ip_addr, port); | 247 | ds = nfs4_pnfs_ds_add(inode, ip_addr, port); |
243 | dprintk("%s Decoded address and port %s\n", __func__, buf); | 248 | dprintk("%s: Decoded address and port %s\n", __func__, buf); |
244 | out_free: | 249 | out_free: |
245 | kfree(buf); | 250 | kfree(buf); |
246 | out_err: | 251 | out_err: |