From: Kari Argillander <kari.argillander@gmail.com>
To: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>,
ntfs3@lists.linux.dev
Cc: Kari Argillander <kari.argillander@gmail.com>,
linux-kernel@vger.kernel.org,
Christian Brauner <christian.brauner@ubuntu.com>
Subject: [PATCH 05/11] fs/ntfs3: Remove unnecessary variable loading in fill_super
Date: Thu, 9 Sep 2021 21:09:36 +0300 [thread overview]
Message-ID: <20210909180942.8634-6-kari.argillander@gmail.com> (raw)
In-Reply-To: <20210909180942.8634-1-kari.argillander@gmail.com>
Remove some unnecessary variable loading. These look like copy paste
work and they are not used to anything.
Signed-off-by: Kari Argillander <kari.argillander@gmail.com>
---
fs/ntfs3/super.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/fs/ntfs3/super.c b/fs/ntfs3/super.c
index f3c3c2bea6ca..2eb1227bbf5a 100644
--- a/fs/ntfs3/super.c
+++ b/fs/ntfs3/super.c
@@ -879,7 +879,7 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc)
struct block_device *bdev = sb->s_bdev;
struct inode *bd_inode = bdev->bd_inode;
struct request_queue *rq = bdev_get_queue(bdev);
- struct inode *inode = NULL;
+ struct inode *inode;
struct ntfs_inode *ni;
size_t i, tt;
CLST vcn, lcn, len;
@@ -979,9 +979,7 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc)
sbi->volume.major_ver = info->major_ver;
sbi->volume.minor_ver = info->minor_ver;
sbi->volume.flags = info->flags;
-
sbi->volume.ni = ni;
- inode = NULL;
/* Load $MFTMirr to estimate recs_mirr. */
ref.low = cpu_to_le32(MFT_REC_MIRR);
@@ -1013,7 +1011,6 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc)
goto out;
iput(inode);
- inode = NULL;
is_ro = sb_rdonly(sbi->sb);
@@ -1090,8 +1087,6 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc)
return PTR_ERR(inode);
}
- ni = ntfs_i(inode);
-
#ifndef CONFIG_NTFS3_64BIT_CLUSTER
if (inode->i_size >> 32) {
err = -EINVAL;
@@ -1190,8 +1185,6 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc)
return PTR_ERR(inode);
}
- ni = ntfs_i(inode);
-
if (inode->i_size != 0x10000 * sizeof(short)) {
err = -EINVAL;
goto out;
@@ -1227,7 +1220,6 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc)
}
iput(inode);
- inode = NULL;
if (is_ntfs3(sbi)) {
/* Load $Secure. */
@@ -1261,8 +1253,6 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc)
return PTR_ERR(inode);
}
- ni = ntfs_i(inode);
-
sb->s_root = d_make_root(inode);
if (!sb->s_root)
return -ENOMEM;
--
2.25.1
next prev parent reply other threads:[~2021-09-09 18:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-09 18:09 [PATCH 00/11] fs/ntfs3: Refactor fill_super Kari Argillander
2021-09-09 18:09 ` [PATCH 01/11] fs/ntfs3: Fix wrong error message $Logfile -> $UpCase Kari Argillander
2021-09-09 18:09 ` [PATCH 02/11] fs/ntfs3: Change EINVAL to ENOMEM when d_make_root fails Kari Argillander
2021-09-09 18:09 ` [PATCH 03/11] fs/ntfs3: Remove impossible fault condition in fill_super Kari Argillander
2021-09-09 18:09 ` [PATCH 04/11] fs/ntfs3: Return straight without goto " Kari Argillander
2021-09-09 18:09 ` Kari Argillander [this message]
2021-09-09 18:09 ` [PATCH 06/11] fs/ntfs3: Use sb instead of sbi->sb " Kari Argillander
2021-09-09 18:09 ` [PATCH 07/11] fs/ntfs3: Remove tmp var is_ro in ntfs_fill_super Kari Argillander
2021-09-09 18:09 ` [PATCH 08/11] fs/ntfs3: Remove tmp pointer bd_inode in fill_super Kari Argillander
2021-09-09 18:09 ` [PATCH 09/11] fs/ntfs3: Remove tmp pointer upcase " Kari Argillander
2021-09-09 18:09 ` [PATCH 10/11] fs/ntfs3: Initialize pointer before use place " Kari Argillander
2021-09-09 18:09 ` [PATCH 11/11] fs/ntfs3: Initiliaze sb blocksize only in one place + refactor Kari Argillander
2021-09-20 16:07 ` [PATCH 00/11] fs/ntfs3: Refactor fill_super Konstantin Komarov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210909180942.8634-6-kari.argillander@gmail.com \
--to=kari.argillander@gmail.com \
--cc=almaz.alexandrovich@paragon-software.com \
--cc=christian.brauner@ubuntu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ntfs3@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).