Replace all sle64 non-zero test conditions with "!sle64_cmpz(...)".
parent
65eea3fe0a
commit
97ccd587d6
|
@ -316,4 +316,6 @@
|
|||
|
||||
#define le64_cmpz(a) (!(a))
|
||||
|
||||
#define sle64_cmpz(a) (!(a))
|
||||
|
||||
#endif /* defined _NTFS_ENDIANS_H */
|
||||
|
|
|
@ -742,7 +742,7 @@ int ntfs_attr_map_whole_runlist(ntfs_attr *na)
|
|||
|
||||
/* Are we in the first extent? */
|
||||
if (!next_vcn) {
|
||||
if (a->lowest_vcn) {
|
||||
if (!sle64_cmpz(a->lowest_vcn)) {
|
||||
errno = EIO;
|
||||
ntfs_log_perror("First extent of inode %llu "
|
||||
"attribute has non-zero lowest_vcn",
|
||||
|
@ -5427,7 +5427,7 @@ static int ntfs_attr_update_meta(ATTR_RECORD *a, ntfs_attr *na, MFT_RECORD *m,
|
|||
ntfs_log_trace("Entering for inode 0x%llx, attr 0x%x\n",
|
||||
(unsigned long long)na->ni->mft_no, na->type);
|
||||
|
||||
if (a->lowest_vcn)
|
||||
if (!sle64_cmpz(a->lowest_vcn))
|
||||
goto out;
|
||||
|
||||
a->allocated_size = cpu_to_sle64(na->allocated_size);
|
||||
|
|
|
@ -760,7 +760,7 @@ static int ntfs_mft_bitmap_extend_allocation_i(ntfs_volume *vol)
|
|||
* We now have extended the mft bitmap allocated_size by one cluster.
|
||||
* Reflect this in the ntfs_attr structure and the attribute record.
|
||||
*/
|
||||
if (a->lowest_vcn) {
|
||||
if (!sle64_cmpz(a->lowest_vcn)) {
|
||||
/*
|
||||
* We are not in the first attribute extent, switch to it, but
|
||||
* first ensure the changes will make it to disk later.
|
||||
|
@ -1112,7 +1112,7 @@ static int ntfs_mft_data_extend_allocation(ntfs_volume *vol)
|
|||
* @rl is the last (non-terminator) runlist element of mft data
|
||||
* attribute.
|
||||
*/
|
||||
if (a->lowest_vcn) {
|
||||
if (!sle64_cmpz(a->lowest_vcn)) {
|
||||
/*
|
||||
* We are not in the first attribute extent, switch to it, but
|
||||
* first ensure the changes will make it to disk later.
|
||||
|
|
Loading…
Reference in New Issue