--- include/ntfs-3g/attrib.h.old	2013-01-13 07:46:35.000000000 +0100
+++ include/ntfs-3g/attrib.h	2013-08-18 10:46:47.000000000 +0200
@@ -61,7 +61,8 @@
 typedef enum {			/* ways of processing holes when expanding */
 	HOLES_NO,
 	HOLES_OK,
-	HOLES_DELAY
+	HOLES_DELAY,
+	HOLES_NONRES
 } hole_type;
 
 /**
--- libntfs-3g/attrib.c.old	2013-08-18 10:46:47.000000000 +0200
+++ libntfs-3g/attrib.c	2013-08-18 10:46:48.000000000 +0200
@@ -4930,7 +4930,7 @@
  *	ENOSPC - There is no enough space in base mft to resize $ATTRIBUTE_LIST.
  */
 static int ntfs_resident_attr_resize_i(ntfs_attr *na, const s64 newsize,
-			BOOL force_non_resident)
+			hole_type holes)
 {
 	ntfs_attr_search_ctx *ctx;
 	ntfs_volume *vol;
@@ -4968,7 +4968,7 @@
 	 * attribute non-resident if the attribute type supports it. If it is
 	 * smaller we can go ahead and attempt the resize.
 	 */
-	if ((newsize < vol->mft_record_size) && !force_non_resident) {
+	if ((newsize < vol->mft_record_size) && (holes != HOLES_NONRES)) {
 		/* Perform the resize of the attribute record. */
 		if (!(ret = ntfs_resident_attr_value_resize(ctx->mrec, ctx->attr,
 				newsize))) {
@@ -5013,7 +5013,7 @@
 		 * could cause the attribute to be made resident again,
 		 * so size changes are not allowed.
 		 */
-		if (force_non_resident) {
+		if (holes == HOLES_NONRES) {
 			ret = 0;
 			if (newsize != na->data_size) {
 				ntfs_log_error("Cannot change size when"
@@ -5024,7 +5024,7 @@
 			return (ret);
 		}
 		/* Resize non-resident attribute */
-		return ntfs_attr_truncate_i(na, newsize, HOLES_OK);
+		return ntfs_attr_truncate_i(na, newsize, holes);
 	} else if (errno != ENOSPC && errno != EPERM) {
 		err = errno;
 		ntfs_log_perror("Failed to make attribute non-resident");
@@ -5080,7 +5080,7 @@
 		ntfs_inode_mark_dirty(tna->ni);
 		ntfs_attr_close(tna);
 		ntfs_attr_put_search_ctx(ctx);
-		return ntfs_resident_attr_resize_i(na, newsize, force_non_resident);
+		return ntfs_resident_attr_resize_i(na, newsize, holes);
 	}
 	/* Check whether error occurred. */
 	if (errno != ENOENT) {
@@ -5100,7 +5100,7 @@
 			ntfs_log_perror("Could not free space in MFT record");
 			return -1;
 		}
-		return ntfs_resident_attr_resize_i(na, newsize, force_non_resident);
+		return ntfs_resident_attr_resize_i(na, newsize, holes);
 	}
 
 	/*
@@ -5139,7 +5139,7 @@
 		ntfs_attr_put_search_ctx(ctx);
 		if (ntfs_inode_add_attrlist(ni))
 			return -1;
-		return ntfs_resident_attr_resize_i(na, newsize, force_non_resident);
+		return ntfs_resident_attr_resize_i(na, newsize, holes);
 	}
 	/* Allocate new mft record. */
 	ni = ntfs_mft_record_alloc(vol, ni);
@@ -5160,7 +5160,7 @@
 
 	ntfs_attr_put_search_ctx(ctx);
 	/* Try to perform resize once again. */
-	return ntfs_resident_attr_resize_i(na, newsize, force_non_resident);
+	return ntfs_resident_attr_resize_i(na, newsize, holes);
 
 resize_done:
 	/*
@@ -5181,7 +5181,7 @@
 	int ret; 
 	
 	ntfs_log_enter("Entering\n");
-	ret = ntfs_resident_attr_resize_i(na, newsize, FALSE);
+	ret = ntfs_resident_attr_resize_i(na, newsize, HOLES_OK);
 	ntfs_log_leave("\n");
 	return ret;
 }
@@ -5205,7 +5205,7 @@
 {
 	int res;
 
-	res = ntfs_resident_attr_resize_i(na, na->data_size, TRUE);
+	res = ntfs_resident_attr_resize_i(na, na->data_size, HOLES_NONRES);
 	if (!res && !NAttrNonResident(na)) {
 		res = -1;
 		errno = EIO;
@@ -6443,7 +6443,7 @@
 		else
 			ret = ntfs_non_resident_attr_shrink(na, fullsize);
 	} else
-		ret = ntfs_resident_attr_resize(na, newsize);
+		ret = ret = ntfs_resident_attr_resize_i(na, newsize, holes);
 out:	
 	ntfs_log_leave("Return status %d\n", ret);
 	return ret;
