On Mon, 25 Apr 2022 15:27:45 +0200 Marius Kittler <mariuskittler@xxxxxx> wrote: > Example from my testing: > ``` > mdadm: unexpected failure opening /dev/md127: No such device or address > ``` > > Before it would just print: > ``` > mdadm: unexpected failure opening /dev/md127 Hi Marius, Thanks for the patch. Could you provide reproduction steps? > diff --git a/util.c b/util.c > index cc94f96e..7c8c0bb1 100644 > --- a/util.c > +++ b/util.c > @@ -1088,8 +1088,9 @@ int open_dev_excl(char *devnm) > long delay = 1000; > > sprintf(buf, "%d:%d", major(devid), minor(devid)); > + int fd = -1; > for (i = 0; i < 25; i++) { > - int fd = dev_open(buf, flags|O_EXCL); > + fd = dev_open(buf, flags|O_EXCL); > if (fd >= 0) > return fd; > if (errno == EACCES && flags == O_RDWR) { > @@ -1102,7 +1103,7 @@ int open_dev_excl(char *devnm) > if (delay < 200000) > delay *= 2; > } > - return -1; > + return fd; There is no change, it is just a refactor. If you really want to change that, then please follow kernel coding style guide. Please also run checkpatch script from kernel source. Could you add Jes and Coly to CC in v2? Thanks, Mariusz