FAILED: patch "[PATCH] ext4: don't set up encryption key during jbd2 transaction" failed to apply to 5.10-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
Possible dependencies:
4c0d5778385c ("ext4: don't set up encryption key during jbd2 transaction")5298d4bfe80f ("unicode: clean up the Kconfig symbol confusion")2b3d04787012 ("unicode: Add utf8-data module")6ca99ce756c2 ("unicode: cache the normalization tables in struct unicode_map") fbc59d65059e ("unicode: move utf8cursor to utf8-selftest.c")9012d79cf0c7 ("unicode: simplify utf8len")379210db489c ("unicode: remove the unused utf8{,n}age{min,max} functions")49bd03cc7e95 ("unicode: pass a UNICODE_AGE() tripple to utf8_load")f3a9c8239600 ("unicode: mark the version field in struct unicode_map unsigned") a440943e68cd ("unicode: remove the charset field from struct unicode_map")227c4d507c71 ("Merge tag 'f2fs-for-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 4c0d5778385cb3618ff26a561ce41de2b7d9de70 Mon Sep 17 00:00:00 2001
From: Eric Biggers <[email protected]>
Date: Sun, 6 Nov 2022 14:48:36 -0800
Subject: [PATCH] ext4: don't set up encryption key during jbd2 transaction
Commit a80f7fcf1867 ("ext4: fixup ext4_fc_track_* functions' signature") extended the scope of the transaction in ext4_unlink() too far, making it include the call to ext4_find_entry(). However, ext4_find_entry() can deadlock when called from within a transaction because it may need to set up the directory's encryption key.
Fix this by restoring the transaction to its original scope.
fs/ext4/ext4.h +2 -2
@@ -3620,8 +3620,8 @@ extern void ext4_initialize_dirent_tail(struct buffer_head *bh, unsigned int blocksize);extern int ext4_handle_dirty_dirblock (handle_t *handle,struct inode *inode,struct buffer_head *bh); -extern int __ext4_unlink (handle_t *handle,struct inode *dir,const struct qstr *d_name, -struct inode *inode); +extern int __ext4_unlink (struct inode *dir,const struct qstr *d_name, +struct inode *inode,struct dentry *dentry);extern int __ext4_link (struct inode *dir,struct inode *inode,struct dentry *dentry);
fs/ext4/fast_commit.c +1 -1
@@ -1397,7 +1397,7 @@ static int ext4_fc_replay_unlink(struct super_block *sb, struct ext4_fc_tl *tl,return 0 ; } - ret =__ext4_unlink (NULL , old_parent, &entry, inode); + ret =__ext4_unlink (old_parent, &entry, inode,NULL );/* -ENOENT ok coz it might not exist anymore. */ if (ret == -ENOENT ) ret =0 ;
fs/ext4/namei.c +24 -20
96 lines not on this page · raw message