mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2024-12-29 09:13:38 +00:00
\n
-----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEq1nRK9aeMoq1VSgcnJ2qBz9kQNkFAmRHq24ACgkQnJ2qBz9k QNkowggAuyZ313GrAUNDH2Cvu3PE804LpW6k27VxtIxmgtMSZvuOED0fC99Xt+3y SnQrJKfw4HVKIDT2sx3ECaiKa+v1UBMG+KmaZ5u5qLjxfjY8YHy6TbHMwY/NV2Aj jGgJYN+5E9AJqStzuu4C9fUzgOgvi4IzgNX4hp0WbESVk6jbDqW2KGNAv6IRM9ku qDg54aL8W50uDMgUJysqe180SlDgeYGPBg1OfA7xrzMaBpEK3z5+v52ZlpGNguDP MZMGwZgFLCP2R5Z9+zqhyK9UuIHUDNE05y20+Hsm1AxlI0iVVt+CahQ9T/6P9OBT QQ+vnepQR6ORtFBlPCVgyiTQgsO3Tw== =+MkS -----END PGP SIGNATURE----- Merge tag 'fs_for_v6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs 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
This commit is contained in:
commit
94fc079266
@ -178,8 +178,9 @@ static inline struct ext2_sb_info *EXT2_SB(struct super_block *sb)
|
||||
* Macro-instructions used to manage several block sizes
|
||||
*/
|
||||
#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_MAX_BLOCK_LOG_SIZE 16
|
||||
#define EXT2_BLOCK_SIZE(s) ((s)->s_blocksize)
|
||||
#define EXT2_ADDR_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof (__u32))
|
||||
#define EXT2_BLOCK_SIZE_BITS(s) ((s)->s_blocksize_bits)
|
||||
|
@ -945,6 +945,13 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)
|
||||
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);
|
||||
|
||||
if (test_opt(sb, DAX)) {
|
||||
|
@ -552,7 +552,6 @@ ext2_xattr_set(struct inode *inode, int name_index, const char *name,
|
||||
error = -ENOMEM;
|
||||
if (header == NULL)
|
||||
goto cleanup;
|
||||
end = (char *)header + sb->s_blocksize;
|
||||
header->h_magic = cpu_to_le32(EXT2_XATTR_MAGIC);
|
||||
header->h_blocks = header->h_refcount = cpu_to_le32(1);
|
||||
last = here = ENTRY(header+1);
|
||||
|
@ -9,7 +9,7 @@ config QUOTA
|
||||
help
|
||||
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
|
||||
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.
|
||||
Ext3, ext4 and reiserfs also support journaled quotas for which
|
||||
you don't need to run quotacheck(8) after an unclean shutdown.
|
||||
@ -28,7 +28,7 @@ config QUOTA_NETLINK_INTERFACE
|
||||
|
||||
config PRINT_QUOTA_WARNING
|
||||
bool "Print quota warnings to console (OBSOLETE)"
|
||||
depends on QUOTA
|
||||
depends on QUOTA && BROKEN
|
||||
default y
|
||||
help
|
||||
If you say Y here, quota warnings (about exceeding softlimit, reaching
|
||||
|
@ -2819,7 +2819,6 @@ EXPORT_SYMBOL(dquot_get_state);
|
||||
int dquot_set_dqinfo(struct super_block *sb, int type, struct qc_info *ii)
|
||||
{
|
||||
struct mem_dqinfo *mi;
|
||||
int err = 0;
|
||||
|
||||
if ((ii->i_fieldmask & QC_WARNS_MASK) ||
|
||||
(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);
|
||||
mark_info_dirty(sb, type);
|
||||
/* Force write to disk */
|
||||
sb->dq_op->write_info(sb, type);
|
||||
return err;
|
||||
return sb->dq_op->write_info(sb, type);
|
||||
}
|
||||
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)
|
||||
{
|
||||
int i, ret;
|
||||
@ -2973,7 +2953,7 @@ static int __init dquot_init(void)
|
||||
|
||||
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",
|
||||
sizeof(struct dquot), sizeof(unsigned long) * 4,
|
||||
|
@ -206,7 +206,7 @@ static int v1_write_file_info(struct super_block *sb, int type)
|
||||
sizeof(struct v1_disk_dqblk), v1_dqoff(0));
|
||||
if (ret == sizeof(struct v1_disk_dqblk))
|
||||
ret = 0;
|
||||
else if (ret > 0)
|
||||
else if (ret >= 0)
|
||||
ret = -EIO;
|
||||
out:
|
||||
up_write(&dqopt->dqio_sem);
|
||||
|
@ -212,7 +212,7 @@ static int v2_write_file_info(struct super_block *sb, int type)
|
||||
up_write(&dqopt->dqio_sem);
|
||||
if (size != sizeof(struct v2_disk_dqinfo)) {
|
||||
quota_error(sb, "Can't write info structure");
|
||||
return -1;
|
||||
return size < 0 ? size : -EIO;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -3031,7 +3031,6 @@ static int do_journal_begin_r(struct reiserfs_transaction_handle *th,
|
||||
unsigned int old_trans_id;
|
||||
struct reiserfs_journal *journal = SB_JOURNAL(sb);
|
||||
struct reiserfs_transaction_handle myth;
|
||||
int sched_count = 0;
|
||||
int retval;
|
||||
int depth;
|
||||
|
||||
@ -3088,7 +3087,6 @@ static int do_journal_begin_r(struct reiserfs_transaction_handle *th,
|
||||
((journal->j_len + nblocks + 2) * 100) <
|
||||
(journal->j_len_alloc * 75)) {
|
||||
if (atomic_read(&journal->j_wcount) > 10) {
|
||||
sched_count++;
|
||||
queue_log_writer(sb);
|
||||
goto relock;
|
||||
}
|
||||
|
@ -1262,7 +1262,6 @@ int reiserfs_delete_item(struct reiserfs_transaction_handle *th,
|
||||
|
||||
#ifdef CONFIG_REISERFS_CHECK
|
||||
char mode;
|
||||
int iter = 0;
|
||||
#endif
|
||||
|
||||
BUG_ON(!th->t_trans_id);
|
||||
@ -1274,7 +1273,6 @@ int reiserfs_delete_item(struct reiserfs_transaction_handle *th,
|
||||
removed = 0;
|
||||
|
||||
#ifdef CONFIG_REISERFS_CHECK
|
||||
iter++;
|
||||
mode =
|
||||
#endif
|
||||
prepare_for_delete_or_cut(th, inode, path,
|
||||
|
@ -188,14 +188,14 @@ static void udf_write_failed(struct address_space *mapping, loff_t to)
|
||||
static int udf_adinicb_writepage(struct folio *folio,
|
||||
struct writeback_control *wbc, void *data)
|
||||
{
|
||||
struct page *page = &folio->page;
|
||||
struct inode *inode = page->mapping->host;
|
||||
struct inode *inode = folio->mapping->host;
|
||||
struct udf_inode_info *iinfo = UDF_I(inode);
|
||||
|
||||
BUG_ON(!PageLocked(page));
|
||||
memcpy_from_page(iinfo->i_data + iinfo->i_lenEAttr, page, 0,
|
||||
BUG_ON(!folio_test_locked(folio));
|
||||
BUG_ON(folio->index != 0);
|
||||
memcpy_from_file_folio(iinfo->i_data + iinfo->i_lenEAttr, folio, 0,
|
||||
i_size_read(inode));
|
||||
unlock_page(page);
|
||||
folio_unlock(folio);
|
||||
mark_inode_dirty(inode);
|
||||
|
||||
return 0;
|
||||
|
@ -127,7 +127,7 @@ void udf_discard_prealloc(struct inode *inode)
|
||||
uint64_t lbcount = 0;
|
||||
int8_t etype = -1;
|
||||
struct udf_inode_info *iinfo = UDF_I(inode);
|
||||
int bsize = 1 << inode->i_blkbits;
|
||||
int bsize = i_blocksize(inode);
|
||||
|
||||
if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB ||
|
||||
ALIGN(inode->i_size, bsize) == ALIGN(iinfo->i_lenExtents, bsize))
|
||||
@ -149,7 +149,7 @@ void udf_discard_prealloc(struct inode *inode)
|
||||
lbcount -= elen;
|
||||
udf_delete_aext(inode, prev_epos);
|
||||
udf_free_blocks(inode->i_sb, inode, &eloc, 0,
|
||||
DIV_ROUND_UP(elen, 1 << inode->i_blkbits));
|
||||
DIV_ROUND_UP(elen, bsize));
|
||||
}
|
||||
/* This inode entry is in-memory only and thus we don't have to mark
|
||||
* the inode dirty */
|
||||
|
Loading…
Reference in New Issue
Block a user