From nobody Mon Feb 9 06:25:52 2026 Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E1CA82144C7 for ; Mon, 29 Dec 2025 11:02:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767006137; cv=none; b=QoQRpxTRE4L670lvO7x+Snvo9ICLIGSMOT/YHSdw+sKaN/FOQ9gKPxLdkmoo6hpS7uklhCQ4cPpO/MBvXdTHbr3z1RNL96N1uu4hyEKO4KBh5tYTF7ttAAC5fPVhMYkM+idt8YR/7gzZNh4HIyt7VzIQuPoPSVQzi6TCrSUup7k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767006137; c=relaxed/simple; bh=3YrBcjWeUiURsqBjJwVvKxJH7j08JTJpBWT9oN2/P9w=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Pe3GY59aBx1SXqmWoyoCKzTRwgM/2Lq/7hPTvFyVDxWDH0ZQnpRSvl8vttWJUDb6Wj1M7b85Usv8CrC2/ezaQmc7atsbaX5xatAMIYeZKlvZikzwIiYoVssTzVY+G5/YOfSQW3HzX3nO+qb+2gTM5RI3uytUWc1o47HwHywvctI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.210.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-7aab7623f42so9891056b3a.2 for ; Mon, 29 Dec 2025 03:02:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767006134; x=1767610934; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=FoXJbeLtc4BE1m/penUt3+btRf2MgFOcX/WyCZiKGHg=; b=k7AhMe7Ofbjzoti1yY7QaKxoWDhM+7jmT0wskB9gam+SqZXbEJriuPlxrQJuqMwJoV E9d/Bl2KP0awO2JpPLM3VbX4HMQg38j3Jg+sKkw/VDpI9svn3Nj1DZ8v/IyUnAetaBkl NTIjvPG1fYqWWLBiTvxxZ1dXgo/k3dqhCSYIXi8BbJXETZDPbfkzUjdL3uCWuJ2HWwqf zN72Odv3i6nBGcXTmxmbJvUD63+jtvXpow06qUD8Jez9am7gZIQjaeNkSsLUAsKM1UzC jauIg23QZwAf5ehbpf4oOaEHq4rXdzmSsoHwKx9OGGOK85MvhmLQyKt8ZMQ9+spKKo+N HvUA== X-Forwarded-Encrypted: i=1; AJvYcCVy+sRsONhOwv8lYcs1pb72UoYexuIWh1w5XrP6huqmZB8W5u7+QXTkVuGUbMtUhXjUt4xfA1U4kG1fLac=@vger.kernel.org X-Gm-Message-State: AOJu0YwyQh3Jk0De9kpifgzWyE8eFGZwHQR+ErILBTbRABGSJ+T4OfjZ z5PbS4v080hlituLLf9ruILTJKiuT1tbW32mNhUDndV7NrENc3ado8rQ X-Gm-Gg: AY/fxX7Pvvry5oRsFRR6+xTQgJZQ+UAMOeGInWKf8rTialkTyA5wfvyrwN/6pkNUu7u XsKrDIxSm2faIMRLIDxILhy33OaFzTbc0T42oFN7wZF/pKbkZp/8jN+VdqaYZ3l0AQNpboX5/mw Nh0+xzxnNRyqHX6JxI6Xff3XST+BSoII9u/7waOYF6sr/MSiv/SjHqqF3/3lWVnkvSwfXlacOQ3 xf0GLrBTRTjJmX2nwucYLqyQ9bF9wOWWa/mc4SNeEkPVcbx27T5hpojRZ2K7p8+baFKsQaO/5VS M3YvasEcyXJQd/9L4XxbP7LKRpnTZagkbIgSI+dNgSwgtBgpCghhnLJ3j2hZmtPV0S9SZ9niCx6 Njv7OGRYMOYGcVgTSIHmSTk/jef4IPzpmKv9RPAh5yXL5CnTSgdcjCOXhxqTfV5nZdQ9gwx+zsu VmGFswEzVIWIu5RunyTKPwqFPQsA== X-Google-Smtp-Source: AGHT+IE7pVq+0PJqmgJ2QrbpNrK+bfo28Ng1OUnm6MYix+9nDaepthnsqyncOYDGiHgp5WOW+X5r+g== X-Received: by 2002:a05:6a00:4087:b0:7e8:4433:8fb6 with SMTP id d2e1a72fcca58-7ff66c6a9ccmr28279021b3a.62.1767006134172; Mon, 29 Dec 2025 03:02:14 -0800 (PST) Received: from localhost.localdomain ([1.227.206.162]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7ff7aa328basm29320722b3a.11.2025.12.29.03.02.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Dec 2025 03:02:13 -0800 (PST) From: Namjae Jeon To: viro@zeniv.linux.org.uk, brauner@kernel.org, hch@infradead.org, hch@lst.de, tytso@mit.edu, willy@infradead.org, jack@suse.cz, djwong@kernel.org, josef@toxicpanda.com, sandeen@sandeen.net, rgoldwyn@suse.com, xiang@kernel.org, dsterba@suse.com, pali@kernel.org, ebiggers@kernel.org, neil@brown.name, amir73il@gmail.com Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, iamjoonsoo.kim@lge.com, cheol.lee@lge.com, jay.sim@lge.com, gunho.lee@lge.com, Namjae Jeon Subject: [PATCH v3 12/14] Revert: ntfs3: serve as alias for the legacy ntfs driver Date: Mon, 29 Dec 2025 19:59:30 +0900 Message-Id: <20251229105932.11360-13-linkinjeon@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20251229105932.11360-1-linkinjeon@kernel.org> References: <20251229105932.11360-1-linkinjeon@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" ntfs filesystem has been remade and is returning as a new implementation. ntfs3 no longer needs to be an alias for ntfs. Signed-off-by: Namjae Jeon --- fs/ntfs3/Kconfig | 9 -------- fs/ntfs3/dir.c | 9 -------- fs/ntfs3/file.c | 10 --------- fs/ntfs3/inode.c | 16 ++++---------- fs/ntfs3/ntfs_fs.h | 11 ---------- fs/ntfs3/super.c | 52 ---------------------------------------------- 6 files changed, 4 insertions(+), 103 deletions(-) diff --git a/fs/ntfs3/Kconfig b/fs/ntfs3/Kconfig index 7bc31d69f680..cdfdf51e55d7 100644 --- a/fs/ntfs3/Kconfig +++ b/fs/ntfs3/Kconfig @@ -46,12 +46,3 @@ config NTFS3_FS_POSIX_ACL NOTE: this is linux only feature. Windows will ignore these ACLs. =20 If you don't know what Access Control Lists are, say N. - -config NTFS_FS - tristate "NTFS file system support" - select NTFS3_FS - select BUFFER_HEAD - select NLS - help - This config option is here only for backward compatibility. NTFS - filesystem is now handled by the NTFS3 driver. diff --git a/fs/ntfs3/dir.c b/fs/ntfs3/dir.c index b98e95d6b4d9..fc39e7330365 100644 --- a/fs/ntfs3/dir.c +++ b/fs/ntfs3/dir.c @@ -631,13 +631,4 @@ const struct file_operations ntfs_dir_operations =3D { .compat_ioctl =3D ntfs_compat_ioctl, #endif }; - -#if IS_ENABLED(CONFIG_NTFS_FS) -const struct file_operations ntfs_legacy_dir_operations =3D { - .llseek =3D generic_file_llseek, - .read =3D generic_read_dir, - .iterate_shared =3D ntfs_readdir, - .open =3D ntfs_file_open, -}; -#endif // clang-format on diff --git a/fs/ntfs3/file.c b/fs/ntfs3/file.c index 2e7b2e566ebe..0faa856fc470 100644 --- a/fs/ntfs3/file.c +++ b/fs/ntfs3/file.c @@ -1478,14 +1478,4 @@ const struct file_operations ntfs_file_operations = =3D { .fallocate =3D ntfs_fallocate, .release =3D ntfs_file_release, }; - -#if IS_ENABLED(CONFIG_NTFS_FS) -const struct file_operations ntfs_legacy_file_operations =3D { - .llseek =3D generic_file_llseek, - .read_iter =3D ntfs_file_read_iter, - .splice_read =3D ntfs_file_splice_read, - .open =3D ntfs_file_open, - .release =3D ntfs_file_release, -}; -#endif // clang-format on diff --git a/fs/ntfs3/inode.c b/fs/ntfs3/inode.c index 0a9ac5efeb67..826840c257d3 100644 --- a/fs/ntfs3/inode.c +++ b/fs/ntfs3/inode.c @@ -444,9 +444,7 @@ static struct inode *ntfs_read_mft(struct inode *inode, * Usually a hard links to directories are disabled. */ inode->i_op =3D &ntfs_dir_inode_operations; - inode->i_fop =3D unlikely(is_legacy_ntfs(sb)) ? - &ntfs_legacy_dir_operations : - &ntfs_dir_operations; + inode->i_fop =3D &ntfs_dir_operations; ni->i_valid =3D 0; } else if (S_ISLNK(mode)) { ni->std_fa &=3D ~FILE_ATTRIBUTE_DIRECTORY; @@ -456,9 +454,7 @@ static struct inode *ntfs_read_mft(struct inode *inode, } else if (S_ISREG(mode)) { ni->std_fa &=3D ~FILE_ATTRIBUTE_DIRECTORY; inode->i_op =3D &ntfs_file_inode_operations; - inode->i_fop =3D unlikely(is_legacy_ntfs(sb)) ? - &ntfs_legacy_file_operations : - &ntfs_file_operations; + inode->i_fop =3D &ntfs_file_operations; inode->i_mapping->a_ops =3D is_compressed(ni) ? &ntfs_aops_cmpr : &ntfs_aops; if (ino !=3D MFT_REC_MFT) @@ -1590,9 +1586,7 @@ int ntfs_create_inode(struct mnt_idmap *idmap, struct= inode *dir, =20 if (S_ISDIR(mode)) { inode->i_op =3D &ntfs_dir_inode_operations; - inode->i_fop =3D unlikely(is_legacy_ntfs(sb)) ? - &ntfs_legacy_dir_operations : - &ntfs_dir_operations; + inode->i_fop =3D &ntfs_dir_operations; } else if (S_ISLNK(mode)) { inode->i_op =3D &ntfs_link_inode_operations; inode->i_fop =3D NULL; @@ -1601,9 +1595,7 @@ int ntfs_create_inode(struct mnt_idmap *idmap, struct= inode *dir, inode_nohighmem(inode); } else if (S_ISREG(mode)) { inode->i_op =3D &ntfs_file_inode_operations; - inode->i_fop =3D unlikely(is_legacy_ntfs(sb)) ? - &ntfs_legacy_file_operations : - &ntfs_file_operations; + inode->i_fop =3D &ntfs_file_operations; inode->i_mapping->a_ops =3D is_compressed(ni) ? &ntfs_aops_cmpr : &ntfs_aops; init_rwsem(&ni->file.run_lock); diff --git a/fs/ntfs3/ntfs_fs.h b/fs/ntfs3/ntfs_fs.h index a4559c9f64e6..326644d23110 100644 --- a/fs/ntfs3/ntfs_fs.h +++ b/fs/ntfs3/ntfs_fs.h @@ -501,7 +501,6 @@ struct inode *dir_search_u(struct inode *dir, const str= uct cpu_str *uni, struct ntfs_fnd *fnd); bool dir_is_empty(struct inode *dir); extern const struct file_operations ntfs_dir_operations; -extern const struct file_operations ntfs_legacy_dir_operations; =20 /* Globals from file.c */ int ntfs_getattr(struct mnt_idmap *idmap, const struct path *path, @@ -516,7 +515,6 @@ long ntfs_compat_ioctl(struct file *filp, u32 cmd, unsi= gned long arg); extern const struct inode_operations ntfs_special_inode_operations; extern const struct inode_operations ntfs_file_inode_operations; extern const struct file_operations ntfs_file_operations; -extern const struct file_operations ntfs_legacy_file_operations; =20 /* Globals from frecord.c */ void ni_remove_mi(struct ntfs_inode *ni, struct mft_inode *mi); @@ -1160,13 +1158,4 @@ static inline void le64_sub_cpu(__le64 *var, u64 val) *var =3D cpu_to_le64(le64_to_cpu(*var) - val); } =20 -#if IS_ENABLED(CONFIG_NTFS_FS) -bool is_legacy_ntfs(struct super_block *sb); -#else -static inline bool is_legacy_ntfs(struct super_block *sb) -{ - return false; -} -#endif - #endif /* _LINUX_NTFS3_NTFS_FS_H */ diff --git a/fs/ntfs3/super.c b/fs/ntfs3/super.c index 8b0cf0ed4f72..d6fd14c191a9 100644 --- a/fs/ntfs3/super.c +++ b/fs/ntfs3/super.c @@ -415,12 +415,6 @@ static int ntfs_fs_reconfigure(struct fs_context *fc) struct ntfs_mount_options *new_opts =3D fc->fs_private; int ro_rw; =20 - /* If ntfs3 is used as legacy ntfs enforce read-only mode. */ - if (is_legacy_ntfs(sb)) { - fc->sb_flags |=3D SB_RDONLY; - goto out; - } - ro_rw =3D sb_rdonly(sb) && !(fc->sb_flags & SB_RDONLY); if (ro_rw && (sbi->flags & NTFS_FLAGS_NEED_REPLAY)) { errorf(fc, @@ -447,7 +441,6 @@ static int ntfs_fs_reconfigure(struct fs_context *fc) return -EINVAL; } =20 -out: sync_filesystem(sb); swap(sbi->options, fc->fs_private); =20 @@ -1670,8 +1663,6 @@ static int ntfs_fill_super(struct super_block *sb, st= ruct fs_context *fc) =20 ntfs_create_procdir(sb); =20 - if (is_legacy_ntfs(sb)) - sb->s_flags |=3D SB_RDONLY; return 0; =20 put_inode_out: @@ -1876,47 +1867,6 @@ static struct file_system_type ntfs_fs_type =3D { .fs_flags =3D FS_REQUIRES_DEV | FS_ALLOW_IDMAP, }; =20 -#if IS_ENABLED(CONFIG_NTFS_FS) -static int ntfs_legacy_init_fs_context(struct fs_context *fc) -{ - int ret; - - ret =3D __ntfs_init_fs_context(fc); - /* If ntfs3 is used as legacy ntfs enforce read-only mode. */ - fc->sb_flags |=3D SB_RDONLY; - return ret; -} - -static struct file_system_type ntfs_legacy_fs_type =3D { - .owner =3D THIS_MODULE, - .name =3D "ntfs", - .init_fs_context =3D ntfs_legacy_init_fs_context, - .parameters =3D ntfs_fs_parameters, - .kill_sb =3D ntfs3_kill_sb, - .fs_flags =3D FS_REQUIRES_DEV | FS_ALLOW_IDMAP, -}; -MODULE_ALIAS_FS("ntfs"); - -static inline void register_as_ntfs_legacy(void) -{ - int err =3D register_filesystem(&ntfs_legacy_fs_type); - if (err) - pr_warn("ntfs3: Failed to register legacy ntfs filesystem driver: %d\n",= err); -} - -static inline void unregister_as_ntfs_legacy(void) -{ - unregister_filesystem(&ntfs_legacy_fs_type); -} -bool is_legacy_ntfs(struct super_block *sb) -{ - return sb->s_type =3D=3D &ntfs_legacy_fs_type; -} -#else -static inline void register_as_ntfs_legacy(void) {} -static inline void unregister_as_ntfs_legacy(void) {} -#endif - // clang-format on =20 static int __init init_ntfs_fs(void) @@ -1945,7 +1895,6 @@ static int __init init_ntfs_fs(void) goto out1; } =20 - register_as_ntfs_legacy(); err =3D register_filesystem(&ntfs_fs_type); if (err) goto out; @@ -1965,7 +1914,6 @@ static void __exit exit_ntfs_fs(void) rcu_barrier(); kmem_cache_destroy(ntfs_inode_cachep); unregister_filesystem(&ntfs_fs_type); - unregister_as_ntfs_legacy(); ntfs3_exit_bitmap(); ntfs_remove_proc_root(); } --=20 2.25.1