Skip to content

Commit 07f4aa9

Browse files
fs/ntfs3: Fix wrong indentations
Also simplifying code. Signed-off-by: Konstantin Komarov <[email protected]>
1 parent c380b52 commit 07f4aa9

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

fs/ntfs3/fslog.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4824,8 +4824,7 @@ int log_replay(struct ntfs_inode *ni, bool *initialized)
48244824
goto out;
48254825
}
48264826
attr = oa->attr;
4827-
t64 = le64_to_cpu(attr->nres.alloc_size);
4828-
if (size > t64) {
4827+
if (size > le64_to_cpu(attr->nres.alloc_size)) {
48294828
attr->nres.valid_size = attr->nres.data_size =
48304829
attr->nres.alloc_size = cpu_to_le64(size);
48314830
}

fs/ntfs3/index.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -625,9 +625,8 @@ void fnd_clear(struct ntfs_fnd *fnd)
625625
static int fnd_push(struct ntfs_fnd *fnd, struct indx_node *n,
626626
struct NTFS_DE *e)
627627
{
628-
int i;
628+
int i = fnd->level;
629629

630-
i = fnd->level;
631630
if (i < 0 || i >= ARRAY_SIZE(fnd->nodes))
632631
return -EINVAL;
633632
fnd->nodes[i] = n;
@@ -2121,9 +2120,10 @@ static int indx_get_entry_to_replace(struct ntfs_index *indx,
21212120
fnd->de[level] = e;
21222121
indx_write(indx, ni, n, 0);
21232122

2124-
/* Check to see if this action created an empty leaf. */
2125-
if (ib_is_leaf(ib) && ib_is_empty(ib))
2123+
if (ib_is_leaf(ib) && ib_is_empty(ib)) {
2124+
/* An empty leaf. */
21262125
return 0;
2126+
}
21272127

21282128
out:
21292129
fnd_clear(fnd);

fs/ntfs3/inode.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1818,11 +1818,12 @@ static int ntfs_translate_junction(const struct super_block *sb,
18181818

18191819
/* Make translated path a relative path to mount point */
18201820
strcpy(translated, "./");
1821-
++link_path; /* Skip leading / */
1821+
++link_path; /* Skip leading / */
18221822
for (tl_len = sizeof("./") - 1; *link_path; ++link_path) {
18231823
if (*link_path == '/') {
18241824
if (PATH_MAX - tl_len < sizeof("../")) {
1825-
ntfs_err(sb, "Link path %s has too many components",
1825+
ntfs_err(sb,
1826+
"Link path %s has too many components",
18261827
link_path);
18271828
err = -EINVAL;
18281829
goto out;
@@ -1838,7 +1839,8 @@ static int ntfs_translate_junction(const struct super_block *sb,
18381839
++target_start;
18391840

18401841
if (!*target_start) {
1841-
ntfs_err(sb, "Link target (%s) missing drive separator", target);
1842+
ntfs_err(sb, "Link target (%s) missing drive separator",
1843+
target);
18421844
err = -EINVAL;
18431845
goto out;
18441846
}

0 commit comments

Comments
 (0)