Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 30111
b: refs/heads/master
c: 33a43f2
h: refs/heads/master
i:
  30109: 893c3ee
  30107: 93eabe4
  30103: 0ba6c37
  30095: 4eabe52
  30079: 57eca05
v: v3
  • Loading branch information
Andy Adamson authored and Trond Myklebust committed Jun 9, 2006
1 parent 46d757b commit 2d7d218
Show file tree
Hide file tree
Showing 2 changed files with 11 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: 6b97fd3da1eab2cc490cfe884c7d4956522eaf8b
refs/heads/master: 33a43f2802d8d7be3a9b541785c4ca9ad79e4310
11 changes: 10 additions & 1 deletion trunk/fs/nfs/nfs4xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -2408,8 +2408,10 @@ static int decode_pathname(struct xdr_stream *xdr, struct nfs4_pathname *path)

READ_BUF(4);
READ32(n);
if (n <= 0)
if (n < 0)
goto out_eio;
if (n == 0)
goto root_path;
dprintk("path ");
path->ncomponents = 0;
while (path->ncomponents < n) {
Expand All @@ -2430,6 +2432,13 @@ static int decode_pathname(struct xdr_stream *xdr, struct nfs4_pathname *path)
out:
dprintk("\n");
return status;
root_path:
/* a root pathname is sent as a zero component4 */
path->ncomponents = 1;
path->components[0].len=0;
path->components[0].data=NULL;
dprintk("path /\n");
goto out;
out_eio:
dprintk(" status %d", status);
status = -EIO;
Expand Down

0 comments on commit 2d7d218

Please sign in to comment.