]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/isofs/export.c
Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso...
[karo-tx-linux.git] / fs / isofs / export.c
index 1d3804492aa77d7ca4440d087fd415febc2e3681..12088d8de3faa1984fa88db3228dfcf669bb1539 100644 (file)
@@ -125,10 +125,10 @@ isofs_export_encode_fh(struct inode *inode,
         */
        if (parent && (len < 5)) {
                *max_len = 5;
-               return 255;
+               return FILEID_INVALID;
        } else if (len < 3) {
                *max_len = 3;
-               return 255;
+               return FILEID_INVALID;
        }
 
        len = 3;
@@ -175,7 +175,7 @@ static struct dentry *isofs_fh_to_parent(struct super_block *sb,
 {
        struct isofs_fid *ifid = (struct isofs_fid *)fid;
 
-       if (fh_type != 2)
+       if (fh_len < 2 || fh_type != 2)
                return NULL;
 
        return isofs_export_iget(sb,