[PATCH 04/12] fs/adfs: use format_version from disc_record

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We only use the format version in one place during filesystem mount, so
it is pointless storing it in the superblock structure.  Also, we should
be using the version from the disc record in the map rather than the
boot block.

Signed-off-by: Russell King <rmk+kernel@xxxxxxxxxxxxxxx>
---
 fs/adfs/adfs.h  | 1 -
 fs/adfs/super.c | 3 +--
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/fs/adfs/adfs.h b/fs/adfs/adfs.h
index ab13b5dd34a3..1c31861aa115 100644
--- a/fs/adfs/adfs.h
+++ b/fs/adfs/adfs.h
@@ -60,7 +60,6 @@ struct adfs_sb_info {
 	__u32		s_map_size;	/* sector size of a map	*/
 	signed int	s_map2blk;	/* shift left by this for map->sector*/
 	unsigned int	s_log2sharesize;/* log2 share size */
-	__le32		s_version;	/* disc format version */
 	unsigned int	s_namelen;	/* maximum number of characters in name	 */
 };
 
diff --git a/fs/adfs/super.c b/fs/adfs/super.c
index 90b9cbcdb4db..26b4b66df2c7 100644
--- a/fs/adfs/super.c
+++ b/fs/adfs/super.c
@@ -441,7 +441,6 @@ static int adfs_fill_super(struct super_block *sb, void *data, int silent)
 	asb->s_idlen		= dr->idlen;
 	asb->s_map_size		= dr->nzones | (dr->nzones_high << 8);
 	asb->s_map2blk		= dr->log2bpmb - dr->log2secsize;
-	asb->s_version 		= dr->format_version;
 	asb->s_log2sharesize	= dr->log2sharesize;
 
 	asb->s_map = adfs_read_map(sb, dr);
@@ -473,7 +472,7 @@ static int adfs_fill_super(struct super_block *sb, void *data, int silent)
 	 * If this is a F+ disk with variable length directories,
 	 * get the root_size from the disc record.
 	 */
-	if (asb->s_version) {
+	if (dr->format_version) {
 		root_obj.size = le32_to_cpu(dr->root_size);
 		asb->s_dir     = &adfs_fplus_dir_ops;
 		asb->s_namelen = ADFS_FPLUS_NAME_LEN;
-- 
2.7.4




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux