tizen 2.3.1 release
[kernel/linux-3.0.git] / fs / xfs / linux-2.6 / xfs_export.c
index fed3f3c..844b22b 100644 (file)
@@ -195,6 +195,9 @@ xfs_fs_fh_to_parent(struct super_block *sb, struct fid *fid,
        struct xfs_fid64        *fid64 = (struct xfs_fid64 *)fid;
        struct inode            *inode = NULL;
 
+       if (fh_len < xfs_fileid_length(fileid_type))
+               return NULL;
+
        switch (fileid_type) {
        case FILEID_INO32_GEN_PARENT:
                inode = xfs_nfs_get_inode(sb, fid->i32.parent_ino,