+ ext3-inode-numbers-are-unsigned-long-fix.patch added to -mm tree

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

 



The patch titled

     ext3 should use uint for internal inode containers

has been added to the -mm tree.  Its filename is

     ext3-inode-numbers-are-unsigned-long-fix.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: ext3 should use uint for internal inode containers
From: Eric Sandeen <esandeen@xxxxxxxxxx>

Talking to sct, he'd prefer to see ext3 continue to use only uints for
inode number containers which are internal to the filesystem, since the
filesystem itself can only do 32-bit inode numbers (on-disk format
restriction), and uint is always 32, while ulong is sometimes 64.
So, this patch bumps the unsigned longs from
ext3-inode-numbers-are-unsigned-long.patch back down to unsigned ints.

Signed-off-by: Eric Sandeen <esandeen@xxxxxxxxxx>
Cc: Mingming Cao <cmm@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 fs/ext3/ialloc.c |    6 +++---
 fs/ext3/super.c  |   14 +++++++-------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff -puN fs/ext3/ialloc.c~ext3-inode-numbers-are-unsigned-long-fix fs/ext3/ialloc.c
--- a/fs/ext3/ialloc.c~ext3-inode-numbers-are-unsigned-long-fix
+++ a/fs/ext3/ialloc.c
@@ -202,7 +202,7 @@ error_return:
 static int find_group_dir(struct super_block *sb, struct inode *parent)
 {
 	int ngroups = EXT3_SB(sb)->s_groups_count;
-	unsigned long freei, avefreei;
+	unsigned int freei, avefreei;
 	struct ext3_group_desc *desc, *best_desc = NULL;
 	struct buffer_head *bh;
 	int group, best_group = -1;
@@ -261,10 +261,10 @@ static int find_group_orlov(struct super
 	struct ext3_super_block *es = sbi->s_es;
 	int ngroups = sbi->s_groups_count;
 	int inodes_per_group = EXT3_INODES_PER_GROUP(sb);
-	unsigned long freei, avefreei;
+	unsigned int freei, avefreei;
 	ext3_fsblk_t freeb, avefreeb;
 	ext3_fsblk_t blocks_per_dir;
-	unsigned long ndirs;
+	unsigned int ndirs;
 	int max_debt, max_dirs, min_inodes;
 	ext3_grpblk_t min_blocks;
 	int group = -1, i;
diff -puN fs/ext3/super.c~ext3-inode-numbers-are-unsigned-long-fix fs/ext3/super.c
--- a/fs/ext3/super.c~ext3-inode-numbers-are-unsigned-long-fix
+++ a/fs/ext3/super.c
@@ -45,7 +45,7 @@
 static int ext3_load_journal(struct super_block *, struct ext3_super_block *,
 			     unsigned long journal_devnum);
 static int ext3_create_journal(struct super_block *, struct ext3_super_block *,
-			       unsigned long);
+			       unsigned int);
 static void ext3_commit_super (struct super_block * sb,
 			       struct ext3_super_block * es,
 			       int sync);
@@ -753,7 +753,7 @@ static ext3_fsblk_t get_sb_block(void **
 }
 
 static int parse_options (char *options, struct super_block *sb,
-			  unsigned long *inum, unsigned long *journal_devnum,
+			  unsigned int *inum, unsigned long *journal_devnum,
 			  ext3_fsblk_t *n_blocks_count, int is_remount)
 {
 	struct ext3_sb_info *sbi = EXT3_SB(sb);
@@ -1395,7 +1395,7 @@ static int ext3_fill_super (struct super
 	ext3_fsblk_t sb_block = get_sb_block(&data);
 	ext3_fsblk_t logic_sb_block;
 	unsigned long offset = 0;
-	unsigned long journal_inum = 0;
+	unsigned int journal_inum = 0;
 	unsigned long journal_devnum = 0;
 	unsigned long def_mount_opts;
 	struct inode *root;
@@ -1846,7 +1846,7 @@ static void ext3_init_journal_params(str
 }
 
 static journal_t *ext3_get_journal(struct super_block *sb,
-				   unsigned long journal_inum)
+				   unsigned int journal_inum)
 {
 	struct inode *journal_inode;
 	journal_t *journal;
@@ -1981,7 +1981,7 @@ static int ext3_load_journal(struct supe
 			     unsigned long journal_devnum)
 {
 	journal_t *journal;
-	unsigned long journal_inum = le32_to_cpu(es->s_journal_inum);
+	unsigned int journal_inum = le32_to_cpu(es->s_journal_inum);
 	dev_t journal_dev;
 	int err = 0;
 	int really_read_only;
@@ -2067,7 +2067,7 @@ static int ext3_load_journal(struct supe
 
 static int ext3_create_journal(struct super_block * sb,
 			       struct ext3_super_block * es,
-			       unsigned long journal_inum)
+			       unsigned int journal_inum)
 {
 	journal_t *journal;
 
@@ -2080,7 +2080,7 @@ static int ext3_create_journal(struct su
 	if (!(journal = ext3_get_journal(sb, journal_inum)))
 		return -EINVAL;
 
-	printk(KERN_INFO "EXT3-fs: creating new journal on inode %lu\n",
+	printk(KERN_INFO "EXT3-fs: creating new journal on inode %u\n",
 	       journal_inum);
 
 	if (journal_create(journal)) {
_

Patches currently in -mm which might be from esandeen@xxxxxxxxxx are

mount-udf-udf_part_flag_read_only-partitions-with-ms_rdonly.patch
fix-ext3-mounts-at-16t.patch
fix-ext3-mounts-at-16t-fix.patch
fix-ext2-mounts-at-16t.patch
fix-ext2-mounts-at-16t-fix.patch
more-ext3-16t-overflow-fixes.patch
more-ext3-16t-overflow-fixes-fix.patch
ext3-inode-numbers-are-unsigned-long.patch
ext3-inode-numbers-are-unsigned-long-fix.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux