diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-03-14 00:30:58 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-03-14 00:30:58 +0300 |
commit | e5e038b7ae9da96b93974bf072ca1876899a01a3 (patch) | |
tree | 76f2298ecb50cb101aa25606130569cb4c18ae7e /fs/ext2 | |
parent | 1715f710e787493f3631d5890c86c9bdb30a36d8 (diff) | |
parent | a78e41a67bef099ca3ffee78c7eda8d43b693f27 (diff) | |
download | linux-e5e038b7ae9da96b93974bf072ca1876899a01a3.tar.xz |
Merge tag 'fs_for_v6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Pull ext2, isofs, udf, and quota updates from Jan Kara:
"A lot of material this time:
- removal of a lot of GFP_NOFS usage from ext2, udf, quota (either it
was legacy or replaced with scoped memalloc_nofs_*() API)
- removal of BUG_ONs in quota code
- conversion of UDF to the new mount API
- tightening quota on disk format verification
- fix some potentially unsafe use of RCU pointers in quota code and
annotate everything properly to make sparse happy
- a few other small quota, ext2, udf, and isofs fixes"
* tag 'fs_for_v6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: (26 commits)
udf: remove SLAB_MEM_SPREAD flag usage
quota: remove SLAB_MEM_SPREAD flag usage
isofs: remove SLAB_MEM_SPREAD flag usage
ext2: remove SLAB_MEM_SPREAD flag usage
ext2: mark as deprecated
udf: convert to new mount API
udf: convert novrs to an option flag
MAINTAINERS: add missing git address for ext2 entry
quota: Detect loops in quota tree
quota: Properly annotate i_dquot arrays with __rcu
quota: Fix rcu annotations of inode dquot pointers
isofs: handle CDs with bad root inode but good Joliet root directory
udf: Avoid invalid LVID used on mount
quota: Fix potential NULL pointer dereference
quota: Drop GFP_NOFS instances under dquot->dq_lock and dqio_sem
quota: Set nofs allocation context when acquiring dqio_sem
ext2: Remove GFP_NOFS use in ext2_xattr_cache_insert()
ext2: Drop GFP_NOFS use in ext2_get_blocks()
ext2: Drop GFP_NOFS allocation from ext2_init_block_alloc_info()
udf: Remove GFP_NOFS allocation in udf_expand_file_adinicb()
...
Diffstat (limited to 'fs/ext2')
-rw-r--r-- | fs/ext2/Kconfig | 15 | ||||
-rw-r--r-- | fs/ext2/balloc.c | 2 | ||||
-rw-r--r-- | fs/ext2/ext2.h | 2 | ||||
-rw-r--r-- | fs/ext2/inode.c | 2 | ||||
-rw-r--r-- | fs/ext2/super.c | 2 | ||||
-rw-r--r-- | fs/ext2/xattr.c | 2 |
6 files changed, 16 insertions, 9 deletions
diff --git a/fs/ext2/Kconfig b/fs/ext2/Kconfig index 74d98965902e..d6cfb1849580 100644 --- a/fs/ext2/Kconfig +++ b/fs/ext2/Kconfig @@ -1,16 +1,23 @@ # SPDX-License-Identifier: GPL-2.0-only config EXT2_FS - tristate "Second extended fs support" + tristate "Second extended fs support (DEPRECATED)" select BUFFER_HEAD select FS_IOMAP select LEGACY_DIRECT_IO help Ext2 is a standard Linux file system for hard disks. - To compile this file system support as a module, choose M here: the - module will be called ext2. + This filesystem driver is deprecated because it does not properly + support inode time stamps beyond 03:14:07 UTC on 19 January 2038. - If unsure, say Y. + Ext2 users are advised to use ext4 driver to access their filesystem. + The driver is fully compatible, supports filesystems without journal + or extents, and also supports larger time stamps if the filesystem + is created with at least 256 byte inodes. + + This code is kept as a simple reference for filesystem developers. + + If unsure, say N. config EXT2_FS_XATTR bool "Ext2 extended attributes" diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c index e124f3d709b2..1bfd6ab11038 100644 --- a/fs/ext2/balloc.c +++ b/fs/ext2/balloc.c @@ -412,7 +412,7 @@ void ext2_init_block_alloc_info(struct inode *inode) struct ext2_block_alloc_info *block_i; struct super_block *sb = inode->i_sb; - block_i = kmalloc(sizeof(*block_i), GFP_NOFS); + block_i = kmalloc(sizeof(*block_i), GFP_KERNEL); if (block_i) { struct ext2_reserve_window_node *rsv = &block_i->rsv_window_node; diff --git a/fs/ext2/ext2.h b/fs/ext2/ext2.h index 677a9ad45dcb..f38bdd46e4f7 100644 --- a/fs/ext2/ext2.h +++ b/fs/ext2/ext2.h @@ -674,7 +674,7 @@ struct ext2_inode_info { struct inode vfs_inode; struct list_head i_orphan; /* unlinked but open inodes */ #ifdef CONFIG_QUOTA - struct dquot *i_dquot[MAXQUOTAS]; + struct dquot __rcu *i_dquot[MAXQUOTAS]; #endif }; diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c index 5a4272b2c6b0..f3d570a9302b 100644 --- a/fs/ext2/inode.c +++ b/fs/ext2/inode.c @@ -754,7 +754,7 @@ static int ext2_get_blocks(struct inode *inode, */ err = sb_issue_zeroout(inode->i_sb, le32_to_cpu(chain[depth-1].key), count, - GFP_NOFS); + GFP_KERNEL); if (err) { mutex_unlock(&ei->truncate_mutex); goto cleanup; diff --git a/fs/ext2/super.c b/fs/ext2/super.c index cabea887314d..37f7ce56adce 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c @@ -319,7 +319,7 @@ static ssize_t ext2_quota_read(struct super_block *sb, int type, char *data, siz static ssize_t ext2_quota_write(struct super_block *sb, int type, const char *data, size_t len, loff_t off); static int ext2_quota_on(struct super_block *sb, int type, int format_id, const struct path *path); -static struct dquot **ext2_get_dquots(struct inode *inode) +static struct dquot __rcu **ext2_get_dquots(struct inode *inode) { return EXT2_I(inode)->i_dquot; } diff --git a/fs/ext2/xattr.c b/fs/ext2/xattr.c index e849241ebb8f..c885dcc3bd0d 100644 --- a/fs/ext2/xattr.c +++ b/fs/ext2/xattr.c @@ -874,7 +874,7 @@ ext2_xattr_cache_insert(struct mb_cache *cache, struct buffer_head *bh) __u32 hash = le32_to_cpu(HDR(bh)->h_hash); int error; - error = mb_cache_entry_create(cache, GFP_NOFS, hash, bh->b_blocknr, + error = mb_cache_entry_create(cache, GFP_KERNEL, hash, bh->b_blocknr, true); if (error) { if (error == -EBUSY) { |