fs/ntfs3: Rename variables and add comment
After renaming we don't need to split code in two lines. Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
This commit is contained in:
parent
a3a956c78e
commit
43f03acbc1
@ -3265,6 +3265,7 @@ int ni_write_inode(struct inode *inode, int sync, const char *hint)
|
|||||||
modified = true;
|
modified = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* std attribute is always in primary MFT record. */
|
||||||
if (modified)
|
if (modified)
|
||||||
ni->mi.dirty = true;
|
ni->mi.dirty = true;
|
||||||
|
|
||||||
|
@ -3048,7 +3048,7 @@ static int do_action(struct ntfs_log *log, struct OPEN_ATTR_ENRTY *oe,
|
|||||||
struct NEW_ATTRIBUTE_SIZES *new_sz;
|
struct NEW_ATTRIBUTE_SIZES *new_sz;
|
||||||
struct ATTR_FILE_NAME *fname;
|
struct ATTR_FILE_NAME *fname;
|
||||||
struct OpenAttr *oa, *oa2;
|
struct OpenAttr *oa, *oa2;
|
||||||
u32 nsize, t32, asize, used, esize, bmp_off, bmp_bits;
|
u32 nsize, t32, asize, used, esize, off, bits;
|
||||||
u16 id, id2;
|
u16 id, id2;
|
||||||
u32 record_size = sbi->record_size;
|
u32 record_size = sbi->record_size;
|
||||||
u64 t64;
|
u64 t64;
|
||||||
@ -3635,30 +3635,28 @@ move_data:
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case SetBitsInNonresidentBitMap:
|
case SetBitsInNonresidentBitMap:
|
||||||
bmp_off =
|
off = le32_to_cpu(((struct BITMAP_RANGE *)data)->bitmap_off);
|
||||||
le32_to_cpu(((struct BITMAP_RANGE *)data)->bitmap_off);
|
bits = le32_to_cpu(((struct BITMAP_RANGE *)data)->bits);
|
||||||
bmp_bits = le32_to_cpu(((struct BITMAP_RANGE *)data)->bits);
|
|
||||||
|
|
||||||
if (cbo + (bmp_off + 7) / 8 > lco ||
|
if (cbo + (off + 7) / 8 > lco ||
|
||||||
cbo + ((bmp_off + bmp_bits + 7) / 8) > lco) {
|
cbo + ((off + bits + 7) / 8) > lco) {
|
||||||
goto dirty_vol;
|
goto dirty_vol;
|
||||||
}
|
}
|
||||||
|
|
||||||
__bitmap_set(Add2Ptr(buffer_le, roff), bmp_off, bmp_bits);
|
__bitmap_set(Add2Ptr(buffer_le, roff), off, bits);
|
||||||
a_dirty = true;
|
a_dirty = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ClearBitsInNonresidentBitMap:
|
case ClearBitsInNonresidentBitMap:
|
||||||
bmp_off =
|
off = le32_to_cpu(((struct BITMAP_RANGE *)data)->bitmap_off);
|
||||||
le32_to_cpu(((struct BITMAP_RANGE *)data)->bitmap_off);
|
bits = le32_to_cpu(((struct BITMAP_RANGE *)data)->bits);
|
||||||
bmp_bits = le32_to_cpu(((struct BITMAP_RANGE *)data)->bits);
|
|
||||||
|
|
||||||
if (cbo + (bmp_off + 7) / 8 > lco ||
|
if (cbo + (off + 7) / 8 > lco ||
|
||||||
cbo + ((bmp_off + bmp_bits + 7) / 8) > lco) {
|
cbo + ((off + bits + 7) / 8) > lco) {
|
||||||
goto dirty_vol;
|
goto dirty_vol;
|
||||||
}
|
}
|
||||||
|
|
||||||
__bitmap_clear(Add2Ptr(buffer_le, roff), bmp_off, bmp_bits);
|
__bitmap_clear(Add2Ptr(buffer_le, roff), off, bits);
|
||||||
a_dirty = true;
|
a_dirty = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user