| Changes by: cha0smaster
Update of /cvsroot/linux-ntfs/ntfsprogs/libntfs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12094/libntfs
Modified Files:
	attrib.c 
Log Message:
fix bug with sparse attribute shinking when runlist is not changed. (already fixed such for expanding, do not know why I forgot to update shrinking)
Index: attrib.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/libntfs/attrib.c,v
retrieving revision 1.204
retrieving revision 1.205
diff -u -p -r1.204 -r1.205
--- attrib.c	10 Feb 2006 11:00:47 -0000	1.204
+++ attrib.c	19 Feb 2006 00:36:23 -0000	1.205
@@ -4612,20 +4612,22 @@ static int ntfs_non_resident_attr_shrink
 	if ((na->allocated_size >> vol->cluster_size_bits) != first_free_vcn) {
 		na->allocated_size = first_free_vcn << vol->cluster_size_bits;
 		a->allocated_size = cpu_to_sle64(na->allocated_size);
-	}
 
-	/* Update compressed_size if present. */
-	if (NAttrSparse(na) || NAttrCompressed(na)) {
-		s64 new_compr_size;
+		/* Update compressed_size if present. */
+		if (NAttrSparse(na) || NAttrCompressed(na)) {
+			s64 new_compr_size;
 
-		new_compr_size = ntfs_rl_get_compressed_size(vol, na->rl);
-		if (new_compr_size == -1) {
-			err = errno;
-			ntfs_log_trace("BUG! Leaving inconstant metadata.\n");
-			goto put_err_out;
+			new_compr_size = ntfs_rl_get_compressed_size(vol,
+					na->rl);
+			if (new_compr_size == -1) {
+				err = errno;
+				ntfs_log_trace("BUG! Leaving inconstant "
+						"metadata.\n");
+				goto put_err_out;
+			}
+			na->compressed_size = new_compr_size;
+			a->compressed_size = cpu_to_sle64(new_compr_size);
 		}
-		na->compressed_size = new_compr_size;
-		a->compressed_size = cpu_to_sle64(new_compr_size);
 	}
 
 	/* Update data and initialized size. */
 |