mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
bcachefs: Improve error handling in bch2_ioctl_subvolume_destroy()
Pure style fixes Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
2d33036ca9
commit
e1e7ecafe6
1 changed files with 8 additions and 7 deletions
|
@ -451,19 +451,20 @@ static long bch2_ioctl_subvolume_destroy(struct bch_fs *c, struct file *filp,
|
|||
return ret;
|
||||
|
||||
if (path.dentry->d_sb->s_fs_info != c) {
|
||||
path_put(&path);
|
||||
return -EXDEV;
|
||||
ret = -EXDEV;
|
||||
goto err;
|
||||
}
|
||||
|
||||
dir = path.dentry->d_parent->d_inode;
|
||||
|
||||
ret = __bch2_unlink(dir, path.dentry, true);
|
||||
if (!ret) {
|
||||
fsnotify_rmdir(dir, path.dentry);
|
||||
d_delete(path.dentry);
|
||||
}
|
||||
path_put(&path);
|
||||
if (ret)
|
||||
goto err;
|
||||
|
||||
fsnotify_rmdir(dir, path.dentry);
|
||||
d_delete(path.dentry);
|
||||
err:
|
||||
path_put(&path);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue