Skip to content

Commit a452c4e

Browse files
committed
Merge tag 'fs_for_v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Pull reiserfs updates from Jan Kara: "The biggest change in this pull is the addition of a deprecation message about reiserfs with the outlook that we'd eventually be able to remove it from the kernel. Because it is practically unmaintained and untested and odd enough that people don't want to bother with it anymore... Otherwise there are small udf and ext2 fixes" * tag 'fs_for_v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: udf: remove redundant assignment of variable etype reiserfs: Deprecate reiserfs ext2: correct max file size computing reiserfs: get rid of AOP_FLAG_CONT_EXPAND flag
2 parents a898850 + 31e9dc4 commit a452c4e

File tree

5 files changed

+20
-17
lines changed

5 files changed

+20
-17
lines changed

fs/ext2/super.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,8 +753,12 @@ static loff_t ext2_max_size(int bits)
753753
res += 1LL << (bits-2);
754754
res += 1LL << (2*(bits-2));
755755
res += 1LL << (3*(bits-2));
756+
/* Compute how many metadata blocks are needed */
757+
meta_blocks = 1;
758+
meta_blocks += 1 + ppb;
759+
meta_blocks += 1 + ppb + ppb * ppb;
756760
/* Does block tree limit file size? */
757-
if (res < upper_limit)
761+
if (res + meta_blocks <= upper_limit)
758762
goto check_lfs;
759763

760764
res = upper_limit;

fs/reiserfs/Kconfig

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
# SPDX-License-Identifier: GPL-2.0-only
22
config REISERFS_FS
3-
tristate "Reiserfs support"
3+
tristate "Reiserfs support (deprecated)"
44
select CRC32
55
help
6-
Stores not just filenames but the files themselves in a balanced
7-
tree. Uses journalling.
6+
Reiserfs is deprecated and scheduled to be removed from the kernel
7+
in 2025. If you are still using it, please migrate to another
8+
filesystem or tell us your usecase for reiserfs.
9+
10+
Reiserfs stores not just filenames but the files themselves in a
11+
balanced tree. Uses journalling.
812

913
Balanced trees are more efficient than traditional file system
1014
architectural foundations.

fs/reiserfs/inode.c

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2763,13 +2763,6 @@ static int reiserfs_write_begin(struct file *file,
27632763
int old_ref = 0;
27642764

27652765
inode = mapping->host;
2766-
*fsdata = NULL;
2767-
if (flags & AOP_FLAG_CONT_EXPAND &&
2768-
(pos & (inode->i_sb->s_blocksize - 1)) == 0) {
2769-
pos ++;
2770-
*fsdata = (void *)(unsigned long)flags;
2771-
}
2772-
27732766
index = pos >> PAGE_SHIFT;
27742767
page = grab_cache_page_write_begin(mapping, index, flags);
27752768
if (!page)
@@ -2896,9 +2889,6 @@ static int reiserfs_write_end(struct file *file, struct address_space *mapping,
28962889
unsigned start;
28972890
bool locked = false;
28982891

2899-
if ((unsigned long)fsdata & AOP_FLAG_CONT_EXPAND)
2900-
pos ++;
2901-
29022892
reiserfs_wait_on_write_block(inode->i_sb);
29032893
if (reiserfs_transaction_running(inode->i_sb))
29042894
th = current->journal_info;
@@ -3316,7 +3306,11 @@ int reiserfs_setattr(struct user_namespace *mnt_userns, struct dentry *dentry,
33163306

33173307
/* fill in hole pointers in the expanding truncate case. */
33183308
if (attr->ia_size > inode->i_size) {
3319-
error = generic_cont_expand_simple(inode, attr->ia_size);
3309+
loff_t pos = attr->ia_size;
3310+
3311+
if ((pos & (inode->i_sb->s_blocksize - 1)) == 0)
3312+
pos++;
3313+
error = generic_cont_expand_simple(inode, pos);
33203314
if (REISERFS_I(inode)->i_prealloc_count > 0) {
33213315
int err;
33223316
struct reiserfs_transaction_handle th;

fs/reiserfs/super.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1652,6 +1652,8 @@ static int read_super_block(struct super_block *s, int offset)
16521652
return 1;
16531653
}
16541654

1655+
reiserfs_warning(NULL, "", "reiserfs filesystem is deprecated and "
1656+
"scheduled to be removed from the kernel in 2025");
16551657
SB_BUFFER_WITH_SB(s) = bh;
16561658
SB_DISK_SUPER_BLOCK(s) = rs;
16571659

fs/udf/super.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2474,15 +2474,14 @@ static unsigned int udf_count_free_table(struct super_block *sb,
24742474
unsigned int accum = 0;
24752475
uint32_t elen;
24762476
struct kernel_lb_addr eloc;
2477-
int8_t etype;
24782477
struct extent_position epos;
24792478

24802479
mutex_lock(&UDF_SB(sb)->s_alloc_mutex);
24812480
epos.block = UDF_I(table)->i_location;
24822481
epos.offset = sizeof(struct unallocSpaceEntry);
24832482
epos.bh = NULL;
24842483

2485-
while ((etype = udf_next_aext(table, &epos, &eloc, &elen, 1)) != -1)
2484+
while (udf_next_aext(table, &epos, &eloc, &elen, 1) != -1)
24862485
accum += (elen >> table->i_sb->s_blocksize_bits);
24872486

24882487
brelse(epos.bh);

0 commit comments

Comments
 (0)