fs: encode_fh: return FILEID_INVALID if invalid fid_type
[deliverable/linux.git] / fs / nilfs2 / namei.c
index 1d0c0b84c5a319e61e24f04f3d643f9284b6cee6..9de78f08989edcd9ab0dc18b3aaca3a65535f11a 100644 (file)
@@ -517,11 +517,11 @@ static int nilfs_encode_fh(struct inode *inode, __u32 *fh, int *lenp,
 
        if (parent && *lenp < NILFS_FID_SIZE_CONNECTABLE) {
                *lenp = NILFS_FID_SIZE_CONNECTABLE;
-               return 255;
+               return FILEID_INVALID;
        }
        if (*lenp < NILFS_FID_SIZE_NON_CONNECTABLE) {
                *lenp = NILFS_FID_SIZE_NON_CONNECTABLE;
-               return 255;
+               return FILEID_INVALID;
        }
 
        fid->cno = root->cno;
This page took 0.027131 seconds and 5 git commands to generate.