Merge branch 'fix/hda' into for-linus
[pandora-kernel.git] / fs / ntfs / attrib.c
index 92dabdc..f5094ee 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <linux/buffer_head.h>
 #include <linux/sched.h>
+#include <linux/slab.h>
 #include <linux/swap.h>
 #include <linux/writeback.h>
 
@@ -179,10 +180,7 @@ int ntfs_map_runlist_nolock(ntfs_inode *ni, VCN vcn, ntfs_attr_search_ctx *ctx)
         * ntfs_mapping_pairs_decompress() fails.
         */
        end_vcn = sle64_to_cpu(a->data.non_resident.highest_vcn) + 1;
-       if (!a->data.non_resident.lowest_vcn && end_vcn == 1)
-               end_vcn = sle64_to_cpu(a->data.non_resident.allocated_size) >>
-                               ni->vol->cluster_size_bits;
-       if (unlikely(vcn >= end_vcn)) {
+       if (unlikely(vcn && vcn >= end_vcn)) {
                err = -ENOENT;
                goto err_out;
        }