bcachefs: Don't lock inode around page_symlink
PATCH 1/1 bcachefs: Don't lock inode around page_symlink
The new inode is not visible before __bch2_link successfully return, no need to lock it.
Reported-by [email protected]
Signed-off-by Alan Huang <[email protected]>
--- fs/bcachefs/fs-io-buffered.c | 1 - fs/bcachefs/fs.c | 2 -- 2 files changed, 3 deletions(-)
fs/bcachefs/fs-io-buffered.c +0 -1
@@ -759,7 +759,6 @@ int bch2_write_end(struct file *file, struct address_space *mapping,struct bch2_folio_reservation *res = fsdata;unsigned offset = pos -folio_pos (folio); -lockdep_assert_held (&inode->v.i_rwsem);BUG_ON (offset + copied >folio_size (folio));if (unlikely (copied < len && !folio_test_uptodate (folio))) {
fs/bcachefs/fs.c +0 -2
@@ -865,9 +865,7 @@ static int bch2_symlink(struct mnt_idmap *idmap,if (IS_ERR (inode))return bch2_err_class (PTR_ERR (inode)); -inode_lock (&inode->v); ret =page_symlink (&inode->v, symname,strlen (symname) +1 ); -inode_unlock (&inode->v);if (unlikely (ret)) goto err;
Signature · 1 line
2.49.0