mirror of
https://github.com/versity/scoutfs.git
synced 2026-08-28 03:46:12 +00:00
Fix bad error exit path in unlink
Unlink looks up the entry items for the name it is removing because we no longer store the extra key material in dentries. If this lookup fails it will use an error path which release a transaction which wasn't held. Thankfully this error path is unlikely (corruption or systemic errors like eio or enomem) so we haven't hit this in practice. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
+1
-1
@@ -931,7 +931,7 @@ static int scoutfs_unlink(struct inode *dir, struct dentry *dentry)
|
||||
ret = lookup_dirent(sb, scoutfs_ino(dir), dentry->d_name.name, dentry->d_name.len, hash,
|
||||
&dent, dir_lock);
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
goto unlock;
|
||||
|
||||
if (should_orphan(inode)) {
|
||||
ret = scoutfs_lock_orphan(sb, SCOUTFS_LOCK_WRITE_ONLY, 0, scoutfs_ino(inode),
|
||||
|
||||
Reference in New Issue
Block a user