s4-pvfs: fixed update of stream sizes
authorAndrew Tridgell <tridge@samba.org>
Sun, 18 Oct 2009 01:24:09 +0000 (12:24 +1100)
committerAndrew Tridgell <tridge@samba.org>
Sun, 18 Oct 2009 04:06:11 +0000 (15:06 +1100)
The data_blob_free() was changing the size we set the stream to

source4/ntvfs/posix/pvfs_streams.c

index 381d2033b0d5b3fca6b7931ce1fbb4eb7ca6b26c..6b39fb6066656dafefa01ea84e144f83b3a765a5 100644 (file)
@@ -532,11 +532,11 @@ NTSTATUS pvfs_stream_truncate(struct pvfs_state *pvfs,
 
        status = pvfs_xattr_save(pvfs, name->full_name, fd, XATTR_DOSSTREAM_PREFIX,
                                 name->stream_name, &blob);
-       data_blob_free(&blob);
 
        if (NT_STATUS_IS_OK(status)) {
                status = pvfs_stream_update_size(pvfs, name, fd, blob.length);
        }
+       data_blob_free(&blob);
 
        return status;
 }