In source3/smbd/oplock_linux.c we call ret = fcntl(fd, F_SETLEASE, leasetype); but don't check if the fd is a regular file.