Commit 94fc0792 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull ext2, reiserfs, udf, and quota updates from Jan Kara:
 "A couple of small fixes and cleanups for ext2, udf, reiserfs, and
  quota.

  The biggest change is making CONFIG_PRINT_QUOTA_WARNING depend on
  BROKEN with an outlook for removing it completely in an year or so"

* tag 'fs_for_v6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
  quota: mark PRINT_QUOTA_WARNING as BROKEN
  quota: update Kconfig comment
  reiserfs: remove unused iter variable
  quota: Use register_sysctl_init() for registering fs_dqstats_table
  reiserfs: remove unused sched_count variable
  ext2: remove redundant assignment to pointer end
  quota: make dquot_set_dqinfo return errors from ->write_info
  quota: fixup *_write_file_info() to return proper error code
  quota: simplify two-level sysctl registration for fs_dqstats_table
  udf: use wrapper i_blocksize() in udf_discard_prealloc()
  udf: Use folios in udf_adinicb_writepage()
  ext2: Check block size validity during mount
  ext2: Correct maximum ext2 filesystem block size
parents 0cfcde1f 36d532d7
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -178,8 +178,9 @@ static inline struct ext2_sb_info *EXT2_SB(struct super_block *sb)
 * Macro-instructions used to manage several block sizes
 * Macro-instructions used to manage several block sizes
 */
 */
#define EXT2_MIN_BLOCK_SIZE		1024
#define EXT2_MIN_BLOCK_SIZE		1024
#define	EXT2_MAX_BLOCK_SIZE		4096
#define	EXT2_MAX_BLOCK_SIZE		65536
#define EXT2_MIN_BLOCK_LOG_SIZE		  10
#define EXT2_MIN_BLOCK_LOG_SIZE		  10
#define EXT2_MAX_BLOCK_LOG_SIZE		  16
#define EXT2_BLOCK_SIZE(s)		((s)->s_blocksize)
#define EXT2_BLOCK_SIZE(s)		((s)->s_blocksize)
#define	EXT2_ADDR_PER_BLOCK(s)		(EXT2_BLOCK_SIZE(s) / sizeof (__u32))
#define	EXT2_ADDR_PER_BLOCK(s)		(EXT2_BLOCK_SIZE(s) / sizeof (__u32))
#define EXT2_BLOCK_SIZE_BITS(s)		((s)->s_blocksize_bits)
#define EXT2_BLOCK_SIZE_BITS(s)		((s)->s_blocksize_bits)
+7 −0
Original line number Original line Diff line number Diff line
@@ -945,6 +945,13 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)
		goto failed_mount;
		goto failed_mount;
	}
	}


	if (le32_to_cpu(es->s_log_block_size) >
	    (EXT2_MAX_BLOCK_LOG_SIZE - BLOCK_SIZE_BITS)) {
		ext2_msg(sb, KERN_ERR,
			 "Invalid log block size: %u",
			 le32_to_cpu(es->s_log_block_size));
		goto failed_mount;
	}
	blocksize = BLOCK_SIZE << le32_to_cpu(sbi->s_es->s_log_block_size);
	blocksize = BLOCK_SIZE << le32_to_cpu(sbi->s_es->s_log_block_size);


	if (test_opt(sb, DAX)) {
	if (test_opt(sb, DAX)) {
+0 −1
Original line number Original line Diff line number Diff line
@@ -552,7 +552,6 @@ ext2_xattr_set(struct inode *inode, int name_index, const char *name,
		error = -ENOMEM;
		error = -ENOMEM;
		if (header == NULL)
		if (header == NULL)
			goto cleanup;
			goto cleanup;
		end = (char *)header + sb->s_blocksize;
		header->h_magic = cpu_to_le32(EXT2_XATTR_MAGIC);
		header->h_magic = cpu_to_le32(EXT2_XATTR_MAGIC);
		header->h_blocks = header->h_refcount = cpu_to_le32(1);
		header->h_blocks = header->h_refcount = cpu_to_le32(1);
		last = here = ENTRY(header+1);
		last = here = ENTRY(header+1);
+2 −2
Original line number Original line Diff line number Diff line
@@ -9,7 +9,7 @@ config QUOTA
	help
	help
	  If you say Y here, you will be able to set per user limits for disk
	  If you say Y here, you will be able to set per user limits for disk
	  usage (also called disk quotas). Currently, it works for the
	  usage (also called disk quotas). Currently, it works for the
	  ext2, ext3, ext4, jfs, ocfs2 and reiserfs file systems.
	  ext2, ext3, ext4, f2fs, jfs, ocfs2 and reiserfs file systems.
	  Note that gfs2 and xfs use their own quota system.
	  Note that gfs2 and xfs use their own quota system.
	  Ext3, ext4 and reiserfs also support journaled quotas for which
	  Ext3, ext4 and reiserfs also support journaled quotas for which
	  you don't need to run quotacheck(8) after an unclean shutdown.
	  you don't need to run quotacheck(8) after an unclean shutdown.
@@ -28,7 +28,7 @@ config QUOTA_NETLINK_INTERFACE


config PRINT_QUOTA_WARNING
config PRINT_QUOTA_WARNING
	bool "Print quota warnings to console (OBSOLETE)"
	bool "Print quota warnings to console (OBSOLETE)"
	depends on QUOTA
	depends on QUOTA && BROKEN
	default y
	default y
	help
	help
	  If you say Y here, quota warnings (about exceeding softlimit, reaching
	  If you say Y here, quota warnings (about exceeding softlimit, reaching
+2 −22
Original line number Original line Diff line number Diff line
@@ -2819,7 +2819,6 @@ EXPORT_SYMBOL(dquot_get_state);
int dquot_set_dqinfo(struct super_block *sb, int type, struct qc_info *ii)
int dquot_set_dqinfo(struct super_block *sb, int type, struct qc_info *ii)
{
{
	struct mem_dqinfo *mi;
	struct mem_dqinfo *mi;
	int err = 0;


	if ((ii->i_fieldmask & QC_WARNS_MASK) ||
	if ((ii->i_fieldmask & QC_WARNS_MASK) ||
	    (ii->i_fieldmask & QC_RT_SPC_TIMER))
	    (ii->i_fieldmask & QC_RT_SPC_TIMER))
@@ -2846,8 +2845,7 @@ int dquot_set_dqinfo(struct super_block *sb, int type, struct qc_info *ii)
	spin_unlock(&dq_data_lock);
	spin_unlock(&dq_data_lock);
	mark_info_dirty(sb, type);
	mark_info_dirty(sb, type);
	/* Force write to disk */
	/* Force write to disk */
	sb->dq_op->write_info(sb, type);
	return sb->dq_op->write_info(sb, type);
	return err;
}
}
EXPORT_SYMBOL(dquot_set_dqinfo);
EXPORT_SYMBOL(dquot_set_dqinfo);


@@ -2948,24 +2946,6 @@ static struct ctl_table fs_dqstats_table[] = {
	{ },
	{ },
};
};


static struct ctl_table fs_table[] = {
	{
		.procname	= "quota",
		.mode		= 0555,
		.child		= fs_dqstats_table,
	},
	{ },
};

static struct ctl_table sys_table[] = {
	{
		.procname	= "fs",
		.mode		= 0555,
		.child		= fs_table,
	},
	{ },
};

static int __init dquot_init(void)
static int __init dquot_init(void)
{
{
	int i, ret;
	int i, ret;
@@ -2973,7 +2953,7 @@ static int __init dquot_init(void)


	printk(KERN_NOTICE "VFS: Disk quotas %s\n", __DQUOT_VERSION__);
	printk(KERN_NOTICE "VFS: Disk quotas %s\n", __DQUOT_VERSION__);


	register_sysctl_table(sys_table);
	register_sysctl_init("fs/quota", fs_dqstats_table);


	dquot_cachep = kmem_cache_create("dquot",
	dquot_cachep = kmem_cache_create("dquot",
			sizeof(struct dquot), sizeof(unsigned long) * 4,
			sizeof(struct dquot), sizeof(unsigned long) * 4,
Loading