]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
fs/ntfs3: Remove unused mi_mark_free
authorKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Thu, 30 Jun 2022 15:49:24 +0000 (18:49 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Jan 2026 12:09:30 +0000 (13:09 +0100)
[ Upstream commit 6700eabb90d50c50be21ecbb71131cd6ecf91ded ]

Cleaning up dead code
Fix wrong comments

Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Stable-dep-of: 4d78d1173a65 ("fs/ntfs3: out1 also needs to put mi")
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ntfs3/namei.c
fs/ntfs3/ntfs_fs.h
fs/ntfs3/record.c
fs/ntfs3/super.c

index c1bce9d656cff3e73b766b10c7f1c7359c1006a0..b66694b84caa05b60a76d3b5c0e36487fee79ad2 100644 (file)
@@ -218,7 +218,7 @@ static int ntfs_mkdir(struct user_namespace *mnt_userns, struct inode *dir,
 }
 
 /*
- * ntfs_rmdir - inode_operations::rm_dir
+ * ntfs_rmdir - inode_operations::rmdir
  */
 static int ntfs_rmdir(struct inode *dir, struct dentry *dentry)
 {
index 7b46926e920c60b4ed18ed095af820a170c2b653..f7ef60bed6d8430db340c508a0bfc8818e7fe8e1 100644 (file)
@@ -740,7 +740,6 @@ static inline struct ATTRIB *rec_find_attr_le(struct mft_inode *rec,
 int mi_write(struct mft_inode *mi, int wait);
 int mi_format_new(struct mft_inode *mi, struct ntfs_sb_info *sbi, CLST rno,
                  __le16 flags, bool is_mft);
-void mi_mark_free(struct mft_inode *mi);
 struct ATTRIB *mi_insert_attr(struct mft_inode *mi, enum ATTR_TYPE type,
                              const __le16 *name, u8 name_len, u32 asize,
                              u16 name_off);
index 383fc3437f02e0dbb14a4012eea65a59cc111df6..cef53583f9a16be4c6eaecb375bc7ce059b8797c 100644 (file)
@@ -405,28 +405,6 @@ int mi_format_new(struct mft_inode *mi, struct ntfs_sb_info *sbi, CLST rno,
        return err;
 }
 
-/*
- * mi_mark_free - Mark record as unused and marks it as free in bitmap.
- */
-void mi_mark_free(struct mft_inode *mi)
-{
-       CLST rno = mi->rno;
-       struct ntfs_sb_info *sbi = mi->sbi;
-
-       if (rno >= MFT_REC_RESERVED && rno < MFT_REC_FREE) {
-               ntfs_clear_mft_tail(sbi, rno, rno + 1);
-               mi->dirty = false;
-               return;
-       }
-
-       if (mi->mrec) {
-               clear_rec_inuse(mi->mrec);
-               mi->dirty = true;
-               mi_write(mi, 0);
-       }
-       ntfs_mark_rec_free(sbi, rno);
-}
-
 /*
  * mi_insert_attr - Reserve space for new attribute.
  *
index 78b08652733171df6c50f5443e7ef2c531aa7c4d..a9952b03218375f3040d9869402e47d204a5d6df 100644 (file)
@@ -1382,7 +1382,7 @@ static const struct fs_context_operations ntfs_context_ops = {
 /*
  * ntfs_init_fs_context - Initialize spi and opts
  *
- * This will called when mount/remount. We will first initiliaze
+ * This will called when mount/remount. We will first initialize
  * options so that if remount we can use just that.
  */
 static int ntfs_init_fs_context(struct fs_context *fc)