lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 11 May 2022 11:59:08 -0700
From:   Tadeusz Struk <tadeusz.struk@...aro.org>
To:     linkinjeon@...nel.org
Cc:     Tadeusz Struk <tadeusz.struk@...aro.org>,
        Sungjong Seo <sj1557.seo@...sung.com>,
        linux-fsdevel@...r.kernel.org, stable@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH v2 1/2] exfat: move is_valid_cluster to a common header

Move the is_valid_cluster() helper from fatent.c to a common
header to make it reusable in other *.c files.

Cc: Namjae Jeon <linkinjeon@...nel.org>
Cc: Sungjong Seo <sj1557.seo@...sung.com>
Cc: linux-fsdevel@...r.kernel.org
Cc: stable@...r.kernel.org
Cc: linux-kernel@...r.kernel.org

Signed-off-by: Tadeusz Struk <tadeusz.struk@...aro.org>
---
 fs/exfat/exfat_fs.h | 6 ++++++
 fs/exfat/fatent.c   | 6 ------
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/fs/exfat/exfat_fs.h b/fs/exfat/exfat_fs.h
index c6800b880920..42d06c68d5c5 100644
--- a/fs/exfat/exfat_fs.h
+++ b/fs/exfat/exfat_fs.h
@@ -381,6 +381,12 @@ static inline int exfat_sector_to_cluster(struct exfat_sb_info *sbi,
 		EXFAT_RESERVED_CLUSTERS;
 }
 
+static inline bool is_valid_cluster(struct exfat_sb_info *sbi,
+		unsigned int clus)
+{
+	return clus >= EXFAT_FIRST_CLUSTER && clus < sbi->num_clusters;
+}
+
 /* super.c */
 int exfat_set_volume_dirty(struct super_block *sb);
 int exfat_clear_volume_dirty(struct super_block *sb);
diff --git a/fs/exfat/fatent.c b/fs/exfat/fatent.c
index a3464e56a7e1..421c27353104 100644
--- a/fs/exfat/fatent.c
+++ b/fs/exfat/fatent.c
@@ -81,12 +81,6 @@ int exfat_ent_set(struct super_block *sb, unsigned int loc,
 	return 0;
 }
 
-static inline bool is_valid_cluster(struct exfat_sb_info *sbi,
-		unsigned int clus)
-{
-	return clus >= EXFAT_FIRST_CLUSTER && clus < sbi->num_clusters;
-}
-
 int exfat_ent_get(struct super_block *sb, unsigned int loc,
 		unsigned int *content)
 {
-- 
2.36.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ