[PATCH] knfsd: fixing missing 'expkey' support for fsid type 3
authorFrank Filz <ffilzlnx@us.ibm.com>
Fri, 30 Jun 2006 08:56:11 +0000 (01:56 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 30 Jun 2006 18:25:39 +0000 (11:25 -0700)
Type '3' is used for the fsid in filehandles when the device number of the
device holding the filesystem has more than 8 bits in either major or minor.
Unfortunately expkey_parse doesn't recognise type 3.  Fix this.

(Slighty modified from Frank's original)

Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/nfsd/export.c

index 3eec300..01bc68c 100644 (file)
@@ -126,7 +126,7 @@ static int expkey_parse(struct cache_detail *cd, char *mesg, int mlen)
        if (*ep)
                goto out;
        dprintk("found fsidtype %d\n", fsidtype);
-       if (fsidtype > 2)
+       if (key_len(fsidtype)==0) /* invalid type */
                goto out;
        if ((len=qword_get(&mesg, buf, PAGE_SIZE)) <= 0)
                goto out;