Skip to content

Commit d3ba7af

Browse files
committed
Merge tag 'ext4_for_linus_bugfixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Pull ext4 fixes from Ted Ts'o: "Two ext4 bug fixes, one being a revert of a commit sent during the merge window" * tag 'ext4_for_linus_bugfixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: Revert "ext4: fix superblock checksum calculation race" ext4: handle dax mount option collision
2 parents 585e5b1 + d196e22 commit d3ba7af

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

fs/ext4/ext4.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,13 +1231,13 @@ struct ext4_inode_info {
12311231
blocks */
12321232
#define EXT4_MOUNT2_HURD_COMPAT 0x00000004 /* Support HURD-castrated
12331233
file systems */
1234-
#define EXT4_MOUNT2_DAX_NEVER 0x00000008 /* Do not allow Direct Access */
1235-
#define EXT4_MOUNT2_DAX_INODE 0x00000010 /* For printing options only */
1236-
12371234
#define EXT4_MOUNT2_EXPLICIT_JOURNAL_CHECKSUM 0x00000008 /* User explicitly
12381235
specified journal checksum */
12391236

12401237
#define EXT4_MOUNT2_JOURNAL_FAST_COMMIT 0x00000010 /* Journal fast commit */
1238+
#define EXT4_MOUNT2_DAX_NEVER 0x00000020 /* Do not allow Direct Access */
1239+
#define EXT4_MOUNT2_DAX_INODE 0x00000040 /* For printing options only */
1240+
12411241

12421242
#define clear_opt(sb, opt) EXT4_SB(sb)->s_mount_opt &= \
12431243
~EXT4_MOUNT_##opt

fs/ext4/super.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -289,18 +289,7 @@ void ext4_superblock_csum_set(struct super_block *sb)
289289
if (!ext4_has_metadata_csum(sb))
290290
return;
291291

292-
/*
293-
* Locking the superblock prevents the scenario
294-
* where:
295-
* 1) a first thread pauses during checksum calculation.
296-
* 2) a second thread updates the superblock, recalculates
297-
* the checksum, and updates s_checksum
298-
* 3) the first thread resumes and finishes its checksum calculation
299-
* and updates s_checksum with a potentially stale or torn value.
300-
*/
301-
lock_buffer(EXT4_SB(sb)->s_sbh);
302292
es->s_checksum = ext4_superblock_csum(sb, es);
303-
unlock_buffer(EXT4_SB(sb)->s_sbh);
304293
}
305294

306295
ext4_fsblk_t ext4_block_bitmap(struct super_block *sb,

0 commit comments

Comments
 (0)