Skip to content

Commit 279b192

Browse files
author
Al Viro
committed
blob_to_mnt(): kern_unmount() is needed to undo kern_mount()
plain mntput() won't do. Signed-off-by: Al Viro <[email protected]>
1 parent f6957b7 commit 279b192

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/usermode_driver.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ static struct vfsmount *blob_to_mnt(const void *data, size_t len, const char *na
2828

2929
file = file_open_root_mnt(mnt, name, O_CREAT | O_WRONLY, 0700);
3030
if (IS_ERR(file)) {
31-
mntput(mnt);
31+
kern_unmount(mnt);
3232
return ERR_CAST(file);
3333
}
3434

@@ -38,7 +38,7 @@ static struct vfsmount *blob_to_mnt(const void *data, size_t len, const char *na
3838
if (err >= 0)
3939
err = -ENOMEM;
4040
filp_close(file, NULL);
41-
mntput(mnt);
41+
kern_unmount(mnt);
4242
return ERR_PTR(err);
4343
}
4444

0 commit comments

Comments
 (0)