Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346542
b: refs/heads/master
c: 28d79ea
h: refs/heads/master
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Nov 4, 2012
1 parent 7b75c71 commit 9982cad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 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: f48407ddd46bd215a7b4e1af3940e759a93640c5
refs/heads/master: 28d79ea33f52cae1ea04808e1ec52b8657b5d804
7 changes: 6 additions & 1 deletion trunk/fs/nfs/mount_clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ int nfs_mount(struct nfs_mount_request *info)
(info->hostname ? info->hostname : "server"),
info->dirpath);

if (strlen(info->dirpath) > MNTPATHLEN)
return -ENAMETOOLONG;

if (info->noresvport)
args.flags |= RPC_CLNT_CREATE_NONPRIVPORT;

Expand Down Expand Up @@ -242,6 +245,9 @@ void nfs_umount(const struct nfs_mount_request *info)
struct rpc_clnt *clnt;
int status;

if (strlen(info->dirpath) > MNTPATHLEN)
return;

if (info->noresvport)
args.flags |= RPC_CLNT_CREATE_NONPRIVPORT;

Expand Down Expand Up @@ -283,7 +289,6 @@ static void encode_mntdirpath(struct xdr_stream *xdr, const char *pathname)
const u32 pathname_len = strlen(pathname);
__be32 *p;

BUG_ON(pathname_len > MNTPATHLEN);
p = xdr_reserve_space(xdr, 4 + pathname_len);
xdr_encode_opaque(p, pathname, pathname_len);
}
Expand Down

0 comments on commit 9982cad

Please sign in to comment.