|
Kmods SIG |
d83023 |
From d3624466b56dd5b1886c1dff500525b544c19c83 Mon Sep 17 00:00:00 2001
|
|
Kmods SIG |
d83023 |
From: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
|
|
Kmods SIG |
d83023 |
Date: Tue, 31 Aug 2021 16:57:40 +0300
|
|
Kmods SIG |
d83023 |
Subject: [Backport d3624466b56d] src: Restyle comments to better align
|
|
Kmods SIG |
d83023 |
with kernel-doc
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
|
|
Kmods SIG |
d83023 |
---
|
|
Kmods SIG |
d83023 |
src/attrib.c | 18 +++++++++++-------
|
|
Kmods SIG |
d83023 |
src/bitmap.c | 5 ++---
|
|
Kmods SIG |
d83023 |
src/file.c | 18 +++++++++---------
|
|
Kmods SIG |
d83023 |
src/frecord.c | 27 +++++++++++++--------------
|
|
Kmods SIG |
d83023 |
src/fslog.c | 11 +++++++----
|
|
Kmods SIG |
d83023 |
src/fsntfs.c | 8 ++++----
|
|
Kmods SIG |
d83023 |
src/index.c | 8 +++++---
|
|
Kmods SIG |
d83023 |
src/inode.c | 20 ++++++++++----------
|
|
Kmods SIG |
d83023 |
src/lznt.c | 5 +++--
|
|
Kmods SIG |
d83023 |
src/ntfs.h | 2 +-
|
|
Kmods SIG |
d83023 |
src/ntfs_fs.h | 24 ++++++++++++------------
|
|
Kmods SIG |
d83023 |
src/record.c | 2 +-
|
|
Kmods SIG |
d83023 |
src/super.c | 2 +-
|
|
Kmods SIG |
d83023 |
src/upcase.c | 2 +-
|
|
Kmods SIG |
d83023 |
src/xattr.c | 7 ++++---
|
|
Kmods SIG |
d83023 |
15 files changed, 84 insertions(+), 75 deletions(-)
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
diff --git a/src/attrib.c b/src/attrib.c
|
|
Kmods SIG |
d83023 |
index ffc323bacc9fe63683395d9535ec65849137551a..34c4cbf7e29bc49bdb3fa060fd2c235c3fb68536 100644
|
|
Kmods SIG |
d83023 |
--- a/src/attrib.c
|
|
Kmods SIG |
d83023 |
+++ b/src/attrib.c
|
|
Kmods SIG |
d83023 |
@@ -199,6 +199,7 @@ int attr_allocate_clusters(struct ntfs_sb_info *sbi, struct runs_tree *run,
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
/* Add new fragment into run storage. */
|
|
Kmods SIG |
d83023 |
if (!run_add_entry(run, vcn, lcn, flen, opt == ALLOCATE_MFT)) {
|
|
Kmods SIG |
d83023 |
+ /* Undo last 'ntfs_look_for_free_space' */
|
|
Kmods SIG |
d83023 |
down_write_nested(&wnd->rw_lock, BITMAP_MUTEX_CLUSTERS);
|
|
Kmods SIG |
d83023 |
wnd_set_free(wnd, lcn, flen);
|
|
Kmods SIG |
d83023 |
up_write(&wnd->rw_lock);
|
|
Kmods SIG |
d83023 |
@@ -351,7 +352,6 @@ int attr_make_nonresident(struct ntfs_inode *ni, struct ATTRIB *attr,
|
|
Kmods SIG |
d83023 |
run_close(run);
|
|
Kmods SIG |
d83023 |
out1:
|
|
Kmods SIG |
d83023 |
kfree(attr_s);
|
|
Kmods SIG |
d83023 |
- /* Reinsert le. */
|
|
Kmods SIG |
d83023 |
out:
|
|
Kmods SIG |
d83023 |
return err;
|
|
Kmods SIG |
d83023 |
}
|
|
Kmods SIG |
d83023 |
@@ -1153,14 +1153,18 @@ int attr_load_runs_vcn(struct ntfs_inode *ni, enum ATTR_TYPE type,
|
|
Kmods SIG |
d83023 |
u16 ro;
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
attr = ni_find_attr(ni, NULL, NULL, type, name, name_len, &vcn, NULL);
|
|
Kmods SIG |
d83023 |
- if (!attr)
|
|
Kmods SIG |
d83023 |
+ if (!attr) {
|
|
Kmods SIG |
d83023 |
+ /* Is record corrupted? */
|
|
Kmods SIG |
d83023 |
return -ENOENT;
|
|
Kmods SIG |
d83023 |
+ }
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
svcn = le64_to_cpu(attr->nres.svcn);
|
|
Kmods SIG |
d83023 |
evcn = le64_to_cpu(attr->nres.evcn);
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
- if (evcn < vcn || vcn < svcn)
|
|
Kmods SIG |
d83023 |
+ if (evcn < vcn || vcn < svcn) {
|
|
Kmods SIG |
d83023 |
+ /* Is record corrupted? */
|
|
Kmods SIG |
d83023 |
return -EINVAL;
|
|
Kmods SIG |
d83023 |
+ }
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
ro = le16_to_cpu(attr->nres.run_off);
|
|
Kmods SIG |
d83023 |
err = run_unpack_ex(run, ni->mi.sbi, ni->mi.rno, svcn, evcn, svcn,
|
|
Kmods SIG |
d83023 |
@@ -1171,7 +1175,7 @@ int attr_load_runs_vcn(struct ntfs_inode *ni, enum ATTR_TYPE type,
|
|
Kmods SIG |
d83023 |
}
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
/*
|
|
Kmods SIG |
d83023 |
- * attr_wof_load_runs_range - Load runs for given range [from to).
|
|
Kmods SIG |
d83023 |
+ * attr_load_runs_range - Load runs for given range [from to).
|
|
Kmods SIG |
d83023 |
*/
|
|
Kmods SIG |
d83023 |
int attr_load_runs_range(struct ntfs_inode *ni, enum ATTR_TYPE type,
|
|
Kmods SIG |
d83023 |
const __le16 *name, u8 name_len, struct runs_tree *run,
|
|
Kmods SIG |
d83023 |
@@ -1974,7 +1978,7 @@ int attr_punch_hole(struct ntfs_inode *ni, u64 vbo, u64 bytes, u32 *frame_size)
|
|
Kmods SIG |
d83023 |
total_size = le64_to_cpu(attr_b->nres.total_size);
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
if (vbo >= alloc_size) {
|
|
Kmods SIG |
d83023 |
- // NOTE: It is allowed.
|
|
Kmods SIG |
d83023 |
+ /* NOTE: It is allowed. */
|
|
Kmods SIG |
d83023 |
return 0;
|
|
Kmods SIG |
d83023 |
}
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
@@ -1986,9 +1990,9 @@ int attr_punch_hole(struct ntfs_inode *ni, u64 vbo, u64 bytes, u32 *frame_size)
|
|
Kmods SIG |
d83023 |
bytes -= vbo;
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
if ((vbo & mask) || (bytes & mask)) {
|
|
Kmods SIG |
d83023 |
- /* We have to zero a range(s)*/
|
|
Kmods SIG |
d83023 |
+ /* We have to zero a range(s). */
|
|
Kmods SIG |
d83023 |
if (frame_size == NULL) {
|
|
Kmods SIG |
d83023 |
- /* Caller insists range is aligned */
|
|
Kmods SIG |
d83023 |
+ /* Caller insists range is aligned. */
|
|
Kmods SIG |
d83023 |
return -EINVAL;
|
|
Kmods SIG |
d83023 |
}
|
|
Kmods SIG |
d83023 |
*frame_size = mask + 1;
|
|
Kmods SIG |
d83023 |
diff --git a/src/bitmap.c b/src/bitmap.c
|
|
Kmods SIG |
d83023 |
index 06ae38adb8ad5601ca134cad3b76871df5d7d3e8..831501555009533d8b3eac04b6258e7072bd6304 100644
|
|
Kmods SIG |
d83023 |
--- a/src/bitmap.c
|
|
Kmods SIG |
d83023 |
+++ b/src/bitmap.c
|
|
Kmods SIG |
d83023 |
@@ -29,7 +29,6 @@ struct rb_node_key {
|
|
Kmods SIG |
d83023 |
size_t key;
|
|
Kmods SIG |
d83023 |
};
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
-/* Tree is sorted by start (key). */
|
|
Kmods SIG |
d83023 |
struct e_node {
|
|
Kmods SIG |
d83023 |
struct rb_node_key start; /* Tree sorted by start. */
|
|
Kmods SIG |
d83023 |
struct rb_node_key count; /* Tree sorted by len. */
|
|
Kmods SIG |
d83023 |
@@ -1117,7 +1116,7 @@ size_t wnd_find(struct wnd_bitmap *wnd, size_t to_alloc, size_t hint,
|
|
Kmods SIG |
d83023 |
sb = wnd->sb;
|
|
Kmods SIG |
d83023 |
log2_bits = sb->s_blocksize_bits + 3;
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
- /* At most two ranges [hint, max_alloc) + [0, hint) */
|
|
Kmods SIG |
d83023 |
+ /* At most two ranges [hint, max_alloc) + [0, hint). */
|
|
Kmods SIG |
d83023 |
Again:
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
/* TODO: Optimize request for case nbits > wbits. */
|
|
Kmods SIG |
d83023 |
@@ -1241,7 +1240,7 @@ size_t wnd_find(struct wnd_bitmap *wnd, size_t to_alloc, size_t hint,
|
|
Kmods SIG |
d83023 |
continue;
|
|
Kmods SIG |
d83023 |
}
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
- /* Read window */
|
|
Kmods SIG |
d83023 |
+ /* Read window. */
|
|
Kmods SIG |
d83023 |
bh = wnd_map(wnd, iw);
|
|
Kmods SIG |
d83023 |
if (IS_ERR(bh)) {
|
|
Kmods SIG |
d83023 |
// TODO: Error.
|
|
Kmods SIG |
d83023 |
diff --git a/src/file.c b/src/file.c
|
|
Kmods SIG |
d83023 |
index 62ebfa324bff5814d0937ac13a043a408e4d3f4d..89557d60a9b0f0e657ce9465504b417bbb50ed04 100644
|
|
Kmods SIG |
d83023 |
--- a/src/file.c
|
|
Kmods SIG |
d83023 |
+++ b/src/file.c
|
|
Kmods SIG |
d83023 |
@@ -190,7 +190,8 @@ static int ntfs_extend_initialized_size(struct file *file,
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
/*
|
|
Kmods SIG |
d83023 |
* ntfs_zero_range - Helper function for punch_hole.
|
|
Kmods SIG |
d83023 |
- * It zeroes a range [vbo, vbo_to)
|
|
Kmods SIG |
d83023 |
+ *
|
|
Kmods SIG |
d83023 |
+ * It zeroes a range [vbo, vbo_to).
|
|
Kmods SIG |
d83023 |
*/
|
|
Kmods SIG |
d83023 |
static int ntfs_zero_range(struct inode *inode, u64 vbo, u64 vbo_to)
|
|
Kmods SIG |
d83023 |
{
|
|
Kmods SIG |
d83023 |
@@ -231,12 +232,12 @@ static int ntfs_zero_range(struct inode *inode, u64 vbo, u64 vbo_to)
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
if (!buffer_mapped(bh)) {
|
|
Kmods SIG |
d83023 |
ntfs_get_block(inode, iblock, bh, 0);
|
|
Kmods SIG |
d83023 |
- /* unmapped? It's a hole - nothing to do */
|
|
Kmods SIG |
d83023 |
+ /* Unmapped? It's a hole - nothing to do. */
|
|
Kmods SIG |
d83023 |
if (!buffer_mapped(bh))
|
|
Kmods SIG |
d83023 |
continue;
|
|
Kmods SIG |
d83023 |
}
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
- /* Ok, it's mapped. Make sure it's up-to-date */
|
|
Kmods SIG |
d83023 |
+ /* Ok, it's mapped. Make sure it's up-to-date. */
|
|
Kmods SIG |
d83023 |
if (PageUptodate(page))
|
|
Kmods SIG |
d83023 |
set_buffer_uptodate(bh);
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
@@ -272,9 +273,8 @@ static int ntfs_zero_range(struct inode *inode, u64 vbo, u64 vbo_to)
|
|
Kmods SIG |
d83023 |
}
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
/*
|
|
Kmods SIG |
d83023 |
- * ntfs_sparse_cluster
|
|
Kmods SIG |
d83023 |
+ * ntfs_sparse_cluster - Helper function to zero a new allocated clusters.
|
|
Kmods SIG |
d83023 |
*
|
|
Kmods SIG |
d83023 |
- * Helper function to zero a new allocated clusters
|
|
Kmods SIG |
d83023 |
* NOTE: 512 <= cluster size <= 2M
|
|
Kmods SIG |
d83023 |
*/
|
|
Kmods SIG |
d83023 |
void ntfs_sparse_cluster(struct inode *inode, struct page *page0, CLST vcn,
|
|
Kmods SIG |
d83023 |
@@ -588,7 +588,7 @@ static long ntfs_fallocate(struct file *file, int mode, loff_t vbo, loff_t len)
|
|
Kmods SIG |
d83023 |
truncate_pagecache(inode, vbo_down);
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
if (!is_sparsed(ni) && !is_compressed(ni)) {
|
|
Kmods SIG |
d83023 |
- /* normal file */
|
|
Kmods SIG |
d83023 |
+ /* Normal file. */
|
|
Kmods SIG |
d83023 |
err = ntfs_zero_range(inode, vbo, end);
|
|
Kmods SIG |
d83023 |
goto out;
|
|
Kmods SIG |
d83023 |
}
|
|
Kmods SIG |
d83023 |
@@ -599,7 +599,7 @@ static long ntfs_fallocate(struct file *file, int mode, loff_t vbo, loff_t len)
|
|
Kmods SIG |
d83023 |
if (err != E_NTFS_NOTALIGNED)
|
|
Kmods SIG |
d83023 |
goto out;
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
- /* process not aligned punch */
|
|
Kmods SIG |
d83023 |
+ /* Process not aligned punch. */
|
|
Kmods SIG |
d83023 |
mask = frame_size - 1;
|
|
Kmods SIG |
d83023 |
vbo_a = (vbo + mask) & ~mask;
|
|
Kmods SIG |
d83023 |
end_a = end & ~mask;
|
|
Kmods SIG |
d83023 |
@@ -647,7 +647,7 @@ static long ntfs_fallocate(struct file *file, int mode, loff_t vbo, loff_t len)
|
|
Kmods SIG |
d83023 |
if (err)
|
|
Kmods SIG |
d83023 |
goto out;
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
- /* Wait for existing dio to complete */
|
|
Kmods SIG |
d83023 |
+ /* Wait for existing dio to complete. */
|
|
Kmods SIG |
d83023 |
inode_dio_wait(inode);
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
truncate_pagecache(inode, vbo_down);
|
|
Kmods SIG |
d83023 |
@@ -1127,7 +1127,7 @@ static ssize_t ntfs_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
|
|
Kmods SIG |
d83023 |
goto out;
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
if (WARN_ON(ni->ni_flags & NI_FLAG_COMPRESSED_MASK)) {
|
|
Kmods SIG |
d83023 |
- /* Should never be here, see ntfs_file_open() */
|
|
Kmods SIG |
d83023 |
+ /* Should never be here, see ntfs_file_open(). */
|
|
Kmods SIG |
d83023 |
ret = -EOPNOTSUPP;
|
|
Kmods SIG |
d83023 |
goto out;
|
|
Kmods SIG |
d83023 |
}
|
|
Kmods SIG |
d83023 |
diff --git a/src/frecord.c b/src/frecord.c
|
|
Kmods SIG |
d83023 |
index 3f48b612ec962c6720fb3d3b3e0d63312f389c81..938b12d56ca676308d2af82666a4f6f19cc8f122 100644
|
|
Kmods SIG |
d83023 |
--- a/src/frecord.c
|
|
Kmods SIG |
d83023 |
+++ b/src/frecord.c
|
|
Kmods SIG |
d83023 |
@@ -56,7 +56,7 @@ static struct mft_inode *ni_find_mi(struct ntfs_inode *ni, CLST rno)
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
/*
|
|
Kmods SIG |
d83023 |
* ni_add_mi - Add new mft_inode into ntfs_inode.
|
|
Kmods SIG |
d83023 |
-*/
|
|
Kmods SIG |
d83023 |
+ */
|
|
Kmods SIG |
d83023 |
static void ni_add_mi(struct ntfs_inode *ni, struct mft_inode *mi)
|
|
Kmods SIG |
d83023 |
{
|
|
Kmods SIG |
d83023 |
ni_ins_mi(ni, &ni->mi_tree, mi->rno, &mi->node);
|
|
Kmods SIG |
d83023 |
@@ -70,9 +70,8 @@ void ni_remove_mi(struct ntfs_inode *ni, struct mft_inode *mi)
|
|
Kmods SIG |
d83023 |
rb_erase(&mi->node, &ni->mi_tree);
|
|
Kmods SIG |
d83023 |
}
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
-/* ni_std
|
|
Kmods SIG |
d83023 |
- *
|
|
Kmods SIG |
d83023 |
- * Return: Pointer into std_info from primary record.
|
|
Kmods SIG |
d83023 |
+/*
|
|
Kmods SIG |
d83023 |
+ * ni_std - Return: Pointer into std_info from primary record.
|
|
Kmods SIG |
d83023 |
*/
|
|
Kmods SIG |
d83023 |
struct ATTR_STD_INFO *ni_std(struct ntfs_inode *ni)
|
|
Kmods SIG |
d83023 |
{
|
|
Kmods SIG |
d83023 |
@@ -385,7 +384,7 @@ bool ni_add_subrecord(struct ntfs_inode *ni, CLST rno, struct mft_inode **mi)
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
/*
|
|
Kmods SIG |
d83023 |
* ni_remove_attr - Remove all attributes for the given type/name/id.
|
|
Kmods SIG |
d83023 |
-*/
|
|
Kmods SIG |
d83023 |
+ */
|
|
Kmods SIG |
d83023 |
int ni_remove_attr(struct ntfs_inode *ni, enum ATTR_TYPE type,
|
|
Kmods SIG |
d83023 |
const __le16 *name, size_t name_len, bool base_only,
|
|
Kmods SIG |
d83023 |
const __le16 *id)
|
|
Kmods SIG |
d83023 |
@@ -740,7 +739,7 @@ static int ni_try_remove_attr_list(struct ntfs_inode *ni)
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
/*
|
|
Kmods SIG |
d83023 |
* ni_create_attr_list - Generates an attribute list for this primary record.
|
|
Kmods SIG |
d83023 |
-*/
|
|
Kmods SIG |
d83023 |
+ */
|
|
Kmods SIG |
d83023 |
int ni_create_attr_list(struct ntfs_inode *ni)
|
|
Kmods SIG |
d83023 |
{
|
|
Kmods SIG |
d83023 |
struct ntfs_sb_info *sbi = ni->mi.sbi;
|
|
Kmods SIG |
d83023 |
@@ -939,7 +938,7 @@ static int ni_ins_attr_ext(struct ntfs_inode *ni, struct ATTR_LIST_ENTRY *le,
|
|
Kmods SIG |
d83023 |
if (is_mft_data &&
|
|
Kmods SIG |
d83023 |
(mi_enum_attr(mi, NULL) ||
|
|
Kmods SIG |
d83023 |
vbo <= ((u64)mi->rno << sbi->record_bits))) {
|
|
Kmods SIG |
d83023 |
- /* We can't accept this record 'case MFT's bootstrapping. */
|
|
Kmods SIG |
d83023 |
+ /* We can't accept this record 'cause MFT's bootstrapping. */
|
|
Kmods SIG |
d83023 |
continue;
|
|
Kmods SIG |
d83023 |
}
|
|
Kmods SIG |
d83023 |
if (is_mft &&
|
|
Kmods SIG |
d83023 |
@@ -1078,7 +1077,7 @@ static int ni_insert_attr(struct ntfs_inode *ni, enum ATTR_TYPE type,
|
|
Kmods SIG |
d83023 |
*/
|
|
Kmods SIG |
d83023 |
max_free = free;
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
- /* Estimate the result of moving all possible attributes away.*/
|
|
Kmods SIG |
d83023 |
+ /* Estimate the result of moving all possible attributes away. */
|
|
Kmods SIG |
d83023 |
attr = NULL;
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
while ((attr = mi_enum_attr(&ni->mi, attr))) {
|
|
Kmods SIG |
d83023 |
@@ -1095,7 +1094,7 @@ static int ni_insert_attr(struct ntfs_inode *ni, enum ATTR_TYPE type,
|
|
Kmods SIG |
d83023 |
goto out;
|
|
Kmods SIG |
d83023 |
}
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
- /* Start real attribute moving */
|
|
Kmods SIG |
d83023 |
+ /* Start real attribute moving. */
|
|
Kmods SIG |
d83023 |
attr = NULL;
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
for (;;) {
|
|
Kmods SIG |
d83023 |
@@ -1542,7 +1541,7 @@ int ni_delete_all(struct ntfs_inode *ni)
|
|
Kmods SIG |
d83023 |
node = next;
|
|
Kmods SIG |
d83023 |
}
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
- /* Free base record */
|
|
Kmods SIG |
d83023 |
+ /* Free base record. */
|
|
Kmods SIG |
d83023 |
clear_rec_inuse(ni->mi.mrec);
|
|
Kmods SIG |
d83023 |
ni->mi.dirty = true;
|
|
Kmods SIG |
d83023 |
err = mi_write(&ni->mi, 0);
|
|
Kmods SIG |
d83023 |
@@ -2243,7 +2242,7 @@ int ni_decompress_file(struct ntfs_inode *ni)
|
|
Kmods SIG |
d83023 |
}
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
if (attr->non_res && is_attr_sparsed(attr)) {
|
|
Kmods SIG |
d83023 |
- /* Sarsed attribute header is 8 bytes bigger than normal. */
|
|
Kmods SIG |
d83023 |
+ /* Sparsed attribute header is 8 bytes bigger than normal. */
|
|
Kmods SIG |
d83023 |
struct MFT_REC *rec = mi->mrec;
|
|
Kmods SIG |
d83023 |
u32 used = le32_to_cpu(rec->used);
|
|
Kmods SIG |
d83023 |
u32 asize = le32_to_cpu(attr->size);
|
|
Kmods SIG |
d83023 |
@@ -2324,7 +2323,7 @@ static int decompress_lzx_xpress(struct ntfs_sb_info *sbi, const char *cmpr,
|
|
Kmods SIG |
d83023 |
mutex_lock(&sbi->compress.mtx_xpress);
|
|
Kmods SIG |
d83023 |
ctx = sbi->compress.xpress;
|
|
Kmods SIG |
d83023 |
if (!ctx) {
|
|
Kmods SIG |
d83023 |
- /* Lazy initialize Xpress decompress context */
|
|
Kmods SIG |
d83023 |
+ /* Lazy initialize Xpress decompress context. */
|
|
Kmods SIG |
d83023 |
ctx = xpress_allocate_decompressor();
|
|
Kmods SIG |
d83023 |
if (!ctx) {
|
|
Kmods SIG |
d83023 |
err = -ENOMEM;
|
|
Kmods SIG |
d83023 |
@@ -2348,7 +2347,7 @@ static int decompress_lzx_xpress(struct ntfs_sb_info *sbi, const char *cmpr,
|
|
Kmods SIG |
d83023 |
/*
|
|
Kmods SIG |
d83023 |
* ni_read_frame
|
|
Kmods SIG |
d83023 |
*
|
|
Kmods SIG |
d83023 |
- * Pages - array of locked pages.
|
|
Kmods SIG |
d83023 |
+ * Pages - Array of locked pages.
|
|
Kmods SIG |
d83023 |
*/
|
|
Kmods SIG |
d83023 |
int ni_read_frame(struct ntfs_inode *ni, u64 frame_vbo, struct page **pages,
|
|
Kmods SIG |
d83023 |
u32 pages_per_frame)
|
|
Kmods SIG |
d83023 |
@@ -2740,7 +2739,7 @@ int ni_write_frame(struct ntfs_inode *ni, struct page **pages,
|
|
Kmods SIG |
d83023 |
lznt = NULL;
|
|
Kmods SIG |
d83023 |
}
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
- /* Compress: frame_mem -> frame_ondisk. */
|
|
Kmods SIG |
d83023 |
+ /* Compress: frame_mem -> frame_ondisk */
|
|
Kmods SIG |
d83023 |
compr_size = compress_lznt(frame_mem, frame_size, frame_ondisk,
|
|
Kmods SIG |
d83023 |
frame_size, sbi->compress.lznt);
|
|
Kmods SIG |
d83023 |
mutex_unlock(&sbi->compress.mtx_lznt);
|
|
Kmods SIG |
d83023 |
diff --git a/src/fslog.c b/src/fslog.c
|
|
Kmods SIG |
d83023 |
index 6f6057129fddd602ce0f86cd2aafba6b5c9fa356..b5853aed0e25bc6d93b3f6f667ae36feda3d980b 100644
|
|
Kmods SIG |
d83023 |
--- a/src/fslog.c
|
|
Kmods SIG |
d83023 |
+++ b/src/fslog.c
|
|
Kmods SIG |
d83023 |
@@ -1362,7 +1362,8 @@ static void log_create(struct ntfs_log *log, u32 l_size, const u64 last_lsn,
|
|
Kmods SIG |
d83023 |
/* Compute the log page values. */
|
|
Kmods SIG |
d83023 |
log->data_off = ALIGN(
|
|
Kmods SIG |
d83023 |
offsetof(struct RECORD_PAGE_HDR, fixups) +
|
|
Kmods SIG |
d83023 |
- sizeof(short) * ((log->page_size >> SECTOR_SHIFT) + 1), 8);
|
|
Kmods SIG |
d83023 |
+ sizeof(short) * ((log->page_size >> SECTOR_SHIFT) + 1),
|
|
Kmods SIG |
d83023 |
+ 8);
|
|
Kmods SIG |
d83023 |
log->data_size = log->page_size - log->data_off;
|
|
Kmods SIG |
d83023 |
log->record_header_len = sizeof(struct LFS_RECORD_HDR);
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
@@ -1372,7 +1373,9 @@ static void log_create(struct ntfs_log *log, u32 l_size, const u64 last_lsn,
|
|
Kmods SIG |
d83023 |
/* Compute the restart page values. */
|
|
Kmods SIG |
d83023 |
log->ra_off = ALIGN(
|
|
Kmods SIG |
d83023 |
offsetof(struct RESTART_HDR, fixups) +
|
|
Kmods SIG |
d83023 |
- sizeof(short) * ((log->sys_page_size >> SECTOR_SHIFT) + 1), 8);
|
|
Kmods SIG |
d83023 |
+ sizeof(short) *
|
|
Kmods SIG |
d83023 |
+ ((log->sys_page_size >> SECTOR_SHIFT) + 1),
|
|
Kmods SIG |
d83023 |
+ 8);
|
|
Kmods SIG |
d83023 |
log->restart_size = log->sys_page_size - log->ra_off;
|
|
Kmods SIG |
d83023 |
log->ra_size = struct_size(log->ra, clients, 1);
|
|
Kmods SIG |
d83023 |
log->current_openlog_count = open_log_count;
|
|
Kmods SIG |
d83023 |
@@ -5132,8 +5135,8 @@ int log_replay(struct ntfs_inode *ni, bool *initialized)
|
|
Kmods SIG |
d83023 |
rh->sys_page_size = cpu_to_le32(log->page_size);
|
|
Kmods SIG |
d83023 |
rh->page_size = cpu_to_le32(log->page_size);
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
- t16 = ALIGN(offsetof(struct RESTART_HDR, fixups) +
|
|
Kmods SIG |
d83023 |
- sizeof(short) * t16, 8);
|
|
Kmods SIG |
d83023 |
+ t16 = ALIGN(offsetof(struct RESTART_HDR, fixups) + sizeof(short) * t16,
|
|
Kmods SIG |
d83023 |
+ 8);
|
|
Kmods SIG |
d83023 |
rh->ra_off = cpu_to_le16(t16);
|
|
Kmods SIG |
d83023 |
rh->minor_ver = cpu_to_le16(1); // 0x1A:
|
|
Kmods SIG |
d83023 |
rh->major_ver = cpu_to_le16(1); // 0x1C:
|
|
Kmods SIG |
d83023 |
diff --git a/src/fsntfs.c b/src/fsntfs.c
|
|
Kmods SIG |
d83023 |
index 66924943921771d3cf46f6a762b1ea81ae1e9ca2..91e3743e1442f10cfc727eba0587a9ef0b20c039 100644
|
|
Kmods SIG |
d83023 |
--- a/src/fsntfs.c
|
|
Kmods SIG |
d83023 |
+++ b/src/fsntfs.c
|
|
Kmods SIG |
d83023 |
@@ -312,7 +312,7 @@ int ntfs_loadlog_and_replay(struct ntfs_inode *ni, struct ntfs_sb_info *sbi)
|
|
Kmods SIG |
d83023 |
if (sb_rdonly(sb) || !initialized)
|
|
Kmods SIG |
d83023 |
goto out;
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
- /* Fill LogFile by '-1' if it is initialized.ssss */
|
|
Kmods SIG |
d83023 |
+ /* Fill LogFile by '-1' if it is initialized. */
|
|
Kmods SIG |
d83023 |
err = ntfs_bio_fill_1(sbi, &ni->file.run);
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
out:
|
|
Kmods SIG |
d83023 |
@@ -960,10 +960,10 @@ int ntfs_set_state(struct ntfs_sb_info *sbi, enum NTFS_DIRTY_FLAGS dirty)
|
|
Kmods SIG |
d83023 |
/* verify(!ntfs_update_mftmirr()); */
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
/*
|
|
Kmods SIG |
d83023 |
- * if we used wait=1, sync_inode_metadata waits for the io for the
|
|
Kmods SIG |
d83023 |
+ * If we used wait=1, sync_inode_metadata waits for the io for the
|
|
Kmods SIG |
d83023 |
* inode to finish. It hangs when media is removed.
|
|
Kmods SIG |
d83023 |
* So wait=0 is sent down to sync_inode_metadata
|
|
Kmods SIG |
d83023 |
- * and filemap_fdatawrite is used for the data blocks
|
|
Kmods SIG |
d83023 |
+ * and filemap_fdatawrite is used for the data blocks.
|
|
Kmods SIG |
d83023 |
*/
|
|
Kmods SIG |
d83023 |
err = sync_inode_metadata(&ni->vfs_inode, 0);
|
|
Kmods SIG |
d83023 |
if (!err)
|
|
Kmods SIG |
d83023 |
@@ -1917,7 +1917,7 @@ int ntfs_security_init(struct ntfs_sb_info *sbi)
|
|
Kmods SIG |
d83023 |
sbi->security.next_id = SECURITY_ID_FIRST;
|
|
Kmods SIG |
d83023 |
/* Always write new security at the end of bucket. */
|
|
Kmods SIG |
d83023 |
sbi->security.next_off =
|
|
Kmods SIG |
d83023 |
- ALIGN(sds_size - SecurityDescriptorsBlockSize, 16);
|
|
Kmods SIG |
d83023 |
+ ALIGN(sds_size - SecurityDescriptorsBlockSize, 16);
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
off = 0;
|
|
Kmods SIG |
d83023 |
ne = NULL;
|
|
Kmods SIG |
d83023 |
diff --git a/src/index.c b/src/index.c
|
|
Kmods SIG |
d83023 |
index 1224b8e42b3e3d07938310739843f0ab7195f326..0daca9adc54c79084743efc2487b49a0ac0d3227 100644
|
|
Kmods SIG |
d83023 |
--- a/src/index.c
|
|
Kmods SIG |
d83023 |
+++ b/src/index.c
|
|
Kmods SIG |
d83023 |
@@ -2624,17 +2624,19 @@ int indx_update_dup(struct ntfs_inode *ni, struct ntfs_sb_info *sbi,
|
|
Kmods SIG |
d83023 |
e_fname = (struct ATTR_FILE_NAME *)(e + 1);
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
if (!memcmp(&e_fname->dup, dup, sizeof(*dup))) {
|
|
Kmods SIG |
d83023 |
- /* Nothing to update in index! Try to avoid this call. */
|
|
Kmods SIG |
d83023 |
+ /*
|
|
Kmods SIG |
d83023 |
+ * Nothing to update in index! Try to avoid this call.
|
|
Kmods SIG |
d83023 |
+ */
|
|
Kmods SIG |
d83023 |
goto out;
|
|
Kmods SIG |
d83023 |
}
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
memcpy(&e_fname->dup, dup, sizeof(*dup));
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
if (fnd->level) {
|
|
Kmods SIG |
d83023 |
- /* directory entry in index */
|
|
Kmods SIG |
d83023 |
+ /* Directory entry in index. */
|
|
Kmods SIG |
d83023 |
err = indx_write(indx, ni, fnd->nodes[fnd->level - 1], sync);
|
|
Kmods SIG |
d83023 |
} else {
|
|
Kmods SIG |
d83023 |
- /* directory entry in directory MFT record */
|
|
Kmods SIG |
d83023 |
+ /* Directory entry in directory MFT record. */
|
|
Kmods SIG |
d83023 |
mi->dirty = true;
|
|
Kmods SIG |
d83023 |
if (sync)
|
|
Kmods SIG |
d83023 |
err = mi_write(mi, 1);
|
|
Kmods SIG |
d83023 |
diff --git a/src/inode.c b/src/inode.c
|
|
Kmods SIG |
d83023 |
index 8f72066b3229a3f87b7b0b0e770bce20a4b06edd..db2a5a4c38e4d62abfb2c7ca16947cd766982b13 100644
|
|
Kmods SIG |
d83023 |
--- a/src/inode.c
|
|
Kmods SIG |
d83023 |
+++ b/src/inode.c
|
|
Kmods SIG |
d83023 |
@@ -89,7 +89,7 @@ static struct inode *ntfs_read_mft(struct inode *inode,
|
|
Kmods SIG |
d83023 |
}
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
if (le32_to_cpu(rec->total) != sbi->record_size) {
|
|
Kmods SIG |
d83023 |
- // Bad inode?
|
|
Kmods SIG |
d83023 |
+ /* Bad inode? */
|
|
Kmods SIG |
d83023 |
err = -EINVAL;
|
|
Kmods SIG |
d83023 |
goto out;
|
|
Kmods SIG |
d83023 |
}
|
|
Kmods SIG |
d83023 |
@@ -605,7 +605,7 @@ static noinline int ntfs_get_block_vbo(struct inode *inode, u64 vbo,
|
|
Kmods SIG |
d83023 |
if (vbo >= valid)
|
|
Kmods SIG |
d83023 |
set_buffer_new(bh);
|
|
Kmods SIG |
d83023 |
} else if (create) {
|
|
Kmods SIG |
d83023 |
- /*normal write*/
|
|
Kmods SIG |
d83023 |
+ /* Normal write. */
|
|
Kmods SIG |
d83023 |
if (bytes > bh->b_size)
|
|
Kmods SIG |
d83023 |
bytes = bh->b_size;
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
@@ -1091,7 +1091,7 @@ int inode_write_data(struct inode *inode, const void *data, size_t bytes)
|
|
Kmods SIG |
d83023 |
/*
|
|
Kmods SIG |
d83023 |
* ntfs_reparse_bytes
|
|
Kmods SIG |
d83023 |
*
|
|
Kmods SIG |
d83023 |
- * Number of bytes to for REPARSE_DATA_BUFFER(IO_REPARSE_TAG_SYMLINK)
|
|
Kmods SIG |
d83023 |
+ * Number of bytes for REPARSE_DATA_BUFFER(IO_REPARSE_TAG_SYMLINK)
|
|
Kmods SIG |
d83023 |
* for unicode string of @uni_len length.
|
|
Kmods SIG |
d83023 |
*/
|
|
Kmods SIG |
d83023 |
static inline u32 ntfs_reparse_bytes(u32 uni_len)
|
|
Kmods SIG |
d83023 |
@@ -1205,13 +1205,13 @@ struct inode *ntfs_create_inode(struct user_namespace *mnt_userns,
|
|
Kmods SIG |
d83023 |
return ERR_PTR(-EINVAL);
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
if (S_ISDIR(mode)) {
|
|
Kmods SIG |
d83023 |
- /* use parent's directory attributes */
|
|
Kmods SIG |
d83023 |
+ /* Use parent's directory attributes. */
|
|
Kmods SIG |
d83023 |
fa = dir_ni->std_fa | FILE_ATTRIBUTE_DIRECTORY |
|
|
Kmods SIG |
d83023 |
FILE_ATTRIBUTE_ARCHIVE;
|
|
Kmods SIG |
d83023 |
/*
|
|
Kmods SIG |
d83023 |
- * By default child directory inherits parent attributes
|
|
Kmods SIG |
d83023 |
- * root directory is hidden + system
|
|
Kmods SIG |
d83023 |
- * Make an exception for children in root
|
|
Kmods SIG |
d83023 |
+ * By default child directory inherits parent attributes.
|
|
Kmods SIG |
d83023 |
+ * Root directory is hidden + system.
|
|
Kmods SIG |
d83023 |
+ * Make an exception for children in root.
|
|
Kmods SIG |
d83023 |
*/
|
|
Kmods SIG |
d83023 |
if (dir->i_ino == MFT_REC_ROOT)
|
|
Kmods SIG |
d83023 |
fa &= ~(FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM);
|
|
Kmods SIG |
d83023 |
@@ -1220,8 +1220,8 @@ struct inode *ntfs_create_inode(struct user_namespace *mnt_userns,
|
|
Kmods SIG |
d83023 |
fa = FILE_ATTRIBUTE_REPARSE_POINT;
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
/*
|
|
Kmods SIG |
d83023 |
- * linux: there are dir/file/symlink and so on.
|
|
Kmods SIG |
d83023 |
- * NTFS: symlinks are "dir + reparse" or "file + reparse".
|
|
Kmods SIG |
d83023 |
+ * Linux: there are dir/file/symlink and so on.
|
|
Kmods SIG |
d83023 |
+ * NTFS: symlinks are "dir + reparse" or "file + reparse"
|
|
Kmods SIG |
d83023 |
* It is good idea to create:
|
|
Kmods SIG |
d83023 |
* dir + reparse if 'symname' points to directory
|
|
Kmods SIG |
d83023 |
* or
|
|
Kmods SIG |
d83023 |
@@ -1860,7 +1860,7 @@ static noinline int ntfs_readlink_hlp(struct inode *inode, char *buffer,
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
default:
|
|
Kmods SIG |
d83023 |
if (IsReparseTagMicrosoft(rp->ReparseTag)) {
|
|
Kmods SIG |
d83023 |
- /* unknown Microsoft Tag */
|
|
Kmods SIG |
d83023 |
+ /* Unknown Microsoft Tag. */
|
|
Kmods SIG |
d83023 |
goto out;
|
|
Kmods SIG |
d83023 |
}
|
|
Kmods SIG |
d83023 |
if (!IsReparseTagNameSurrogate(rp->ReparseTag) ||
|
|
Kmods SIG |
d83023 |
diff --git a/src/lznt.c b/src/lznt.c
|
|
Kmods SIG |
d83023 |
index 3acf0d9f0b1511d967a6613e05c5845046b97549..f1f691a67cc490254957f062cfc38ec12ac7e834 100644
|
|
Kmods SIG |
d83023 |
--- a/src/lznt.c
|
|
Kmods SIG |
d83023 |
+++ b/src/lznt.c
|
|
Kmods SIG |
d83023 |
@@ -296,8 +296,9 @@ static inline ssize_t decompress_chunk(u8 *unc, u8 *unc_end, const u8 *cmpr,
|
|
Kmods SIG |
d83023 |
*/
|
|
Kmods SIG |
d83023 |
struct lznt *get_lznt_ctx(int level)
|
|
Kmods SIG |
d83023 |
{
|
|
Kmods SIG |
d83023 |
- struct lznt *r = kzalloc(level ? offsetof(struct lznt, hash) :
|
|
Kmods SIG |
d83023 |
- sizeof(struct lznt), GFP_NOFS);
|
|
Kmods SIG |
d83023 |
+ struct lznt *r = kzalloc(level ? offsetof(struct lznt, hash)
|
|
Kmods SIG |
d83023 |
+ : sizeof(struct lznt),
|
|
Kmods SIG |
d83023 |
+ GFP_NOFS);
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
if (r)
|
|
Kmods SIG |
d83023 |
r->std = !level;
|
|
Kmods SIG |
d83023 |
diff --git a/src/ntfs.h b/src/ntfs.h
|
|
Kmods SIG |
d83023 |
index 0fd7bffb98d4dfe030ee2b4eaf9fa75647f8369d..6bb3e595263b67c7cc66a0fecc5dfa68310826d4 100644
|
|
Kmods SIG |
d83023 |
--- a/src/ntfs.h
|
|
Kmods SIG |
d83023 |
+++ b/src/ntfs.h
|
|
Kmods SIG |
d83023 |
@@ -262,7 +262,7 @@ enum RECORD_FLAG {
|
|
Kmods SIG |
d83023 |
RECORD_FLAG_UNKNOWN = cpu_to_le16(0x0008),
|
|
Kmods SIG |
d83023 |
};
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
-/* MFT Record structure, */
|
|
Kmods SIG |
d83023 |
+/* MFT Record structure. */
|
|
Kmods SIG |
d83023 |
struct MFT_REC {
|
|
Kmods SIG |
d83023 |
struct NTFS_RECORD_HEADER rhdr; // 'FILE'
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
diff --git a/src/ntfs_fs.h b/src/ntfs_fs.h
|
|
Kmods SIG |
d83023 |
index f9436cbbc347b617b458bb21d6c7229b467ca289..97e682ebcfb94dd1ad9677ed5ee82bb6a88401a5 100644
|
|
Kmods SIG |
d83023 |
--- a/src/ntfs_fs.h
|
|
Kmods SIG |
d83023 |
+++ b/src/ntfs_fs.h
|
|
Kmods SIG |
d83023 |
@@ -59,18 +59,18 @@ struct ntfs_mount_options {
|
|
Kmods SIG |
d83023 |
u16 fs_fmask_inv;
|
|
Kmods SIG |
d83023 |
u16 fs_dmask_inv;
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
- unsigned uid : 1, /* uid was set. */
|
|
Kmods SIG |
d83023 |
- gid : 1, /* gid was set. */
|
|
Kmods SIG |
d83023 |
- fmask : 1, /* fmask was set. */
|
|
Kmods SIG |
d83023 |
- dmask : 1, /* dmask was set. */
|
|
Kmods SIG |
d83023 |
- sys_immutable : 1,/* Immutable system files. */
|
|
Kmods SIG |
d83023 |
- discard : 1, /* Issue discard requests on deletions. */
|
|
Kmods SIG |
d83023 |
- sparse : 1, /* Create sparse files. */
|
|
Kmods SIG |
d83023 |
- showmeta : 1, /* Show meta files. */
|
|
Kmods SIG |
d83023 |
- nohidden : 1, /* Do not show hidden files. */
|
|
Kmods SIG |
d83023 |
- force : 1, /* Rw mount dirty volume. */
|
|
Kmods SIG |
d83023 |
- no_acs_rules : 1,/*Exclude acs rules. */
|
|
Kmods SIG |
d83023 |
- prealloc : 1 /* Preallocate space when file is growing. */
|
|
Kmods SIG |
d83023 |
+ unsigned uid : 1, /* uid was set. */
|
|
Kmods SIG |
d83023 |
+ gid : 1, /* gid was set. */
|
|
Kmods SIG |
d83023 |
+ fmask : 1, /* fmask was set. */
|
|
Kmods SIG |
d83023 |
+ dmask : 1, /* dmask was set. */
|
|
Kmods SIG |
d83023 |
+ sys_immutable : 1, /* Immutable system files. */
|
|
Kmods SIG |
d83023 |
+ discard : 1, /* Issue discard requests on deletions. */
|
|
Kmods SIG |
d83023 |
+ sparse : 1, /* Create sparse files. */
|
|
Kmods SIG |
d83023 |
+ showmeta : 1, /* Show meta files. */
|
|
Kmods SIG |
d83023 |
+ nohidden : 1, /* Do not show hidden files. */
|
|
Kmods SIG |
d83023 |
+ force : 1, /* Rw mount dirty volume. */
|
|
Kmods SIG |
d83023 |
+ no_acs_rules : 1, /*Exclude acs rules. */
|
|
Kmods SIG |
d83023 |
+ prealloc : 1 /* Preallocate space when file is growing. */
|
|
Kmods SIG |
d83023 |
;
|
|
Kmods SIG |
d83023 |
};
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
diff --git a/src/record.c b/src/record.c
|
|
Kmods SIG |
d83023 |
index 61e3f2fb619f698ffdf5d81ca6f488008002de52..103705c86772f45a90227e6434449e99c4d7d94b 100644
|
|
Kmods SIG |
d83023 |
--- a/src/record.c
|
|
Kmods SIG |
d83023 |
+++ b/src/record.c
|
|
Kmods SIG |
d83023 |
@@ -219,7 +219,7 @@ struct ATTRIB *mi_enum_attr(struct mft_inode *mi, struct ATTRIB *attr)
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
asize = le32_to_cpu(attr->size);
|
|
Kmods SIG |
d83023 |
if (asize < SIZEOF_RESIDENT) {
|
|
Kmods SIG |
d83023 |
- /* Impossible 'cause we should not return such attribute */
|
|
Kmods SIG |
d83023 |
+ /* Impossible 'cause we should not return such attribute. */
|
|
Kmods SIG |
d83023 |
return NULL;
|
|
Kmods SIG |
d83023 |
}
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
diff --git a/src/super.c b/src/super.c
|
|
Kmods SIG |
d83023 |
index 2fbab8a931eeb7a3c69471fb1fcb1c3e8b0d582a..dbecf095da59268da2fede022b71cb2b40b2d909 100644
|
|
Kmods SIG |
d83023 |
--- a/src/super.c
|
|
Kmods SIG |
d83023 |
+++ b/src/super.c
|
|
Kmods SIG |
d83023 |
@@ -1053,7 +1053,7 @@ static int ntfs_fill_super(struct super_block *sb, void *data, int silent)
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
iput(inode);
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
- /* Load $LogFile to replay. */
|
|
Kmods SIG |
d83023 |
+ /* Load LogFile to replay. */
|
|
Kmods SIG |
d83023 |
ref.low = cpu_to_le32(MFT_REC_LOG);
|
|
Kmods SIG |
d83023 |
ref.seq = cpu_to_le16(MFT_REC_LOG);
|
|
Kmods SIG |
d83023 |
inode = ntfs_iget5(sb, &ref, &NAME_LOGFILE);
|
|
Kmods SIG |
d83023 |
diff --git a/src/upcase.c b/src/upcase.c
|
|
Kmods SIG |
d83023 |
index eb65bbd939e8cdf17d209b60243e5fddeddabdf3..bbeba778237eefc318b00e04b05ad0ac1592e1ec 100644
|
|
Kmods SIG |
d83023 |
--- a/src/upcase.c
|
|
Kmods SIG |
d83023 |
+++ b/src/upcase.c
|
|
Kmods SIG |
d83023 |
@@ -34,7 +34,7 @@ static inline u16 upcase_unicode_char(const u16 *upcase, u16 chr)
|
|
Kmods SIG |
d83023 |
* - Case insensitive
|
|
Kmods SIG |
d83023 |
* - If name equals and 'bothcases' then
|
|
Kmods SIG |
d83023 |
* - Case sensitive
|
|
Kmods SIG |
d83023 |
- * 'Straigth way' code scans input names twice in worst case.
|
|
Kmods SIG |
d83023 |
+ * 'Straight way' code scans input names twice in worst case.
|
|
Kmods SIG |
d83023 |
* Optimized code scans input names only once.
|
|
Kmods SIG |
d83023 |
*/
|
|
Kmods SIG |
d83023 |
int ntfs_cmp_names(const __le16 *s1, size_t l1, const __le16 *s2, size_t l2,
|
|
Kmods SIG |
d83023 |
diff --git a/src/xattr.c b/src/xattr.c
|
|
Kmods SIG |
d83023 |
index 22fd5eb32c5be7f53b3fd8076599f7dbaf84e2cf..b15d532e4a17087b06284d82965c21224f1d4f35 100644
|
|
Kmods SIG |
d83023 |
--- a/src/xattr.c
|
|
Kmods SIG |
d83023 |
+++ b/src/xattr.c
|
|
Kmods SIG |
d83023 |
@@ -26,9 +26,10 @@
|
|
Kmods SIG |
d83023 |
static inline size_t unpacked_ea_size(const struct EA_FULL *ea)
|
|
Kmods SIG |
d83023 |
{
|
|
Kmods SIG |
d83023 |
return ea->size ? le32_to_cpu(ea->size)
|
|
Kmods SIG |
d83023 |
- : ALIGN(struct_size(
|
|
Kmods SIG |
d83023 |
- ea, name,
|
|
Kmods SIG |
d83023 |
- 1 + ea->name_len + le16_to_cpu(ea->elength)), 4);
|
|
Kmods SIG |
d83023 |
+ : ALIGN(struct_size(ea, name,
|
|
Kmods SIG |
d83023 |
+ 1 + ea->name_len +
|
|
Kmods SIG |
d83023 |
+ le16_to_cpu(ea->elength)),
|
|
Kmods SIG |
d83023 |
+ 4);
|
|
Kmods SIG |
d83023 |
}
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
static inline size_t packed_ea_size(const struct EA_FULL *ea)
|
|
Kmods SIG |
d83023 |
--
|
|
Kmods SIG |
d83023 |
2.31.1
|
|
Kmods SIG |
d83023 |
|