s64 __ntfs_cluster_free (struct inode * vi, const VCN start_vcn, s64 count, const BOOL is_rollback);
Free count clusters starting at the cluster start_vcn in the runlist described by the vfs inode vi.
If count is -1, all clusters from start_vcn to the end of the runlist are deallocated. Thus, to completely free all clusters in a runlist, use start_vcn = 0 and count = -1.
is_rollback should always be FALSE, it is for internal use to rollback errors. You probably want to use ntfs_cluster_free instead.
Note, ntfs_cluster_free does not modify the runlist at all, so the caller has to deal with it later.
Return the number of deallocated clusters (not counting sparse ones) on success and -errno on error.
- The runlist described by vi must be unlocked on entry and is unlocked on return. - This function takes the runlist lock of vi for reading and sometimes for writing and sometimes modifies the runlist. - The volume lcn bitmap must be unlocked on entry and is unlocked on return. - This function takes the volume lcn bitmap lock for writing and modifies the bitmap contents.