Skip to content

Commit 20aff4f

Browse files
committed
merge branch 'pr-1867'
Revert "libcontainer/rootfs_linux: minor cleanup" LGTMs: @hqhq @cyphar Closes opencontainers#1867
2 parents 2c3d776 + 26ec8a9 commit 20aff4f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

libcontainer/rootfs_linux.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ func prepareRootfs(pipe io.ReadWriter, iConfig *initConfig) (err error) {
4646
return newSystemErrorWithCause(err, "preparing rootfs")
4747
}
4848

49+
setupDev := needsSetupDev(config)
4950
for _, m := range config.Mounts {
5051
for _, precmd := range m.PremountCmds {
5152
if err := mountCmd(precmd); err != nil {
@@ -64,8 +65,6 @@ func prepareRootfs(pipe io.ReadWriter, iConfig *initConfig) (err error) {
6465
}
6566
}
6667

67-
setupDev := needsSetupDev(config)
68-
6968
if setupDev {
7069
if err := createDevices(config); err != nil {
7170
return newSystemErrorWithCause(err, "creating device nodes")

0 commit comments

Comments
 (0)