* [PATCH] bcachefs: Don't lock inode around page_symlink
@ 2025-08-04 17:32 Alan Huang
0 siblings, 0 replies; only message in thread
From: Alan Huang @ 2025-08-04 17:32 UTC (permalink / raw)
To: kent.overstreet; +Cc: linux-bcachefs, Alan Huang, syzbot+7836a68852a10ec3d790
The new inode is not visible before __bch2_link successfully return,
no need to lock it.
Reported-by: syzbot+7836a68852a10ec3d790@syzkaller.appspotmail.com
Signed-off-by: Alan Huang <mmpgouride@gmail.com>
---
fs/bcachefs/fs-io-buffered.c | 1 -
fs/bcachefs/fs.c | 2 --
2 files changed, 3 deletions(-)
diff --git a/fs/bcachefs/fs-io-buffered.c b/fs/bcachefs/fs-io-buffered.c
index 0005569ecace..c5ed62a11f23 100644
--- a/fs/bcachefs/fs-io-buffered.c
+++ b/fs/bcachefs/fs-io-buffered.c
@@ -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))) {
diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c
index b5e3090f1cb8..66e32cc66841 100644
--- a/fs/bcachefs/fs.c
+++ b/fs/bcachefs/fs.c
@@ -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;
--
2.49.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2025-08-04 17:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-04 17:32 [PATCH] bcachefs: Don't lock inode around page_symlink Alan Huang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).